Results 1 to 5 of 5

Thread: string truncated when outputed to file from dts

  1. #1
    Join Date
    Sep 2002
    Posts
    159

    string truncated when outputed to file from dts

    Hi
    I need output string to file using DTS data
    transformation,this string will be used to import data to IBM db2

    Example
    source sql server ,destination text
    file with column x qutable with size 326

    source string

    select
    'CONNECT TO ' + rtrim('REPLACED_WITH_SOME_VALUE') + ' USER REPLACED_WITH_SOME_VALUE USING REPLACED_WITH_SOME_VALUE;' + char(13) + char(10)+
    'IMPORT FROM ' + rtrim('REPLACED_WITH_SOME_VALUE ')+ rtrim('REPLACED_WITH_SOME_VALUE ') +' OF DEL MODIFIED BY chardel"" coldel, decpt. COMMITCOUNT 1000'+char(13) + char(10)+
    'MESSAGES '+ + rtrim('REPLACED_WITH_SOME_VALUE') + rtrim('REPLACED_WITH_SOME_VALUE') + ' INSERT INTO UCIT.CUST_PRICE_ENT;'+ char(13) + char(10)+
    + 'TERMINATE;'+ char(13) + char(10)
    as x

    string get truncated when outputed to file by DTS

    Same string fully outputed to screen when run from QA

    Any idea
    thank you

    Alex

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    Nothing got truncated for me when I ran the DTS.

    What sql server version and what service pack your have?

    Attached DTS package
    Attached Files Attached Files

  3. #3
    Join Date
    Sep 2002
    Posts
    159
    thanks Mak,
    I tried to execute your dts from 2 servers
    same result , string truncated...

    Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
    Dec 17 2002 14:22:05
    Copyright (c) 1988-2003 Microsoft Corporation
    Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)


    Microsoft SQL Server 2000 - 8.00.818 (Intel X86)
    May 31 2003 16:08:15
    Copyright (c) 1988-2003 Microsoft Corporation
    Standard Edition on Windows NT 5.2 (Build 3790: )

  4. #4
    Join Date
    Feb 2003
    Posts
    1,048
    DTS has a limitation of 255 characters for text fields when exporting to a delimited text file. See the following KB Article:

    http://support.microsoft.com/support.../Q247/5/27.ASP


    For this reason, I use bcp (bulk copy program) for my text file exports unless I know for a fact that every field is less than 255 and always will be. The downside of using bcp is that it doesn't export the column headers. I use DOS scripting to get around that.

    There are other alternatives listed at the bottom of the KB article.

  5. #5
    Join Date
    Sep 2002
    Posts
    159
    thank you

    I used
    --
    Select Destination File Format
    You want to select Fixed field - information is assigned into columns of equal width.

    --
    as suggested in article and everything work fine

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •