Exporting data to cvcs and txt issues with lengths over 255

  • Hi all,

    Im exporting a table from SQL Server to a csv file. One of the columns is called SESSIONS and (Unfortunately) it can contain up to 600 characters so In SQL Server its set up as nvarchar 600. I have used import and export data and every time this field is truncated to 255 characters.

    I set up a DTS package and made sure that the source data was OK and that the column was the correct length and then exported and still it truncated to 255 characters.

    I then tried it with a txt file and still got this problem. Does anyone know if there is some kind of option that can be set to bypass it or if I am doing anything silly which is why this is happening?

    Thanks

    Debbie

  • since you said DTS, I'm guessing you are using 2000, right.

    there's two issues I know of:

    the ole driver can have a default limit of 255 chars; see this thread on how to change it to 2000 or whatever is good for you:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=19&messageid=186904

     

    another has to do with SP2 i think:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=19&messageid=9214

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Brilliant,

    Thanks you so much for that. I knew there was going to be an option somewhere but I wouldnt have found that one for a long time.

    Everything is exporting properly now.

    Thanks again

    Debbie

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

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