How to Use DTS to Export a Table to a text file?

  • Hi,

    How to Use DTS to Export a Table to a text file? what are the steps? I also would like to format and convert data during the process, for example: Convert integer such as 1 to "01" and convert datatime to a format of "YYMMDD" etc.

    Thanks

  • Take a look at the Tutorial section over at http://www.sqldts.com

    http://www.sqldts.com/default.aspx?107

    Hope this helps

    Phill Carter

    --------------------

    Colt 45 - the original point and click interface

    --------------------
    Colt 45 - the original point and click interface

  • Check out REPLICATE to pad with leading zeros:

    select replicate('0', N - datalength(cast (X as varchar (N)))) +

    cast (X as varchar (N))

    from, YYY

    N = length of string

    X = name of column being converted

    YYY = table name

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply