Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Description Truncated

Status
Not open for further replies.

nyzja

Programmer
Jan 13, 2005
31
US
Hello!

I have a DTS package that runs a SQL script and exports the results into a .txt file. But my resulting text file gives me a truncated description. If I run the script in QA or in Query view of the table in SQL Server Enterprise Manager, I get the description fine.

My SQL looks like this:

SELECT ID, CONVERT(nvarchar(2000), REPLACE(REPLACE(REPLACE(CONVERT(nvarchar(2000), DESCRIPTION), CHAR(13) + CHAR(10), ''), CHAR(13), ''), CHAR(10), '')) AS DESCRIPTION
FROM table1


The max datalength of the description is only 290 characters. I also tried to do a convert to nvarChar(4000) after all the replace, but it still truncates to the same spot... about 255 characters...

Is there some setting in DTS that I can change for this?


Please advise.
Thanks!
 
Check the destination connection, that being your .txt file and make sure the properties of the description column is NOT being defined as 255. If it is ... set it to 300 and see what happens.

Thanks

J. Kusch
 
The destination size is actually 2000 quotable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top