dbTalk Databases Forums  

End of row cut off when importing a text file

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss End of row cut off when importing a text file in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dschrier13
 
Posts: n/a

Default End of row cut off when importing a text file - 01-29-2004 , 10:52 AM






I am trying to import a text file using DTS. The file is
not delimited by tabs or commas so I have to use fixed
length. When I scroll to the right of the preview screen,
I see that the end-of-line (red vertical line) is at the
end of the last character of the first line. But there are
other lines that are longer and they are truncated.

Any suggestions?

Thanks.

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: End of row cut off when importing a text file - 01-29-2004 , 03:52 PM






In message <6b7c01c3e688$50d198c0$a501280a (AT) phx (DOT) gbl>, dschrier13
<anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
I am trying to import a text file using DTS. The file is
not delimited by tabs or commas so I have to use fixed
length. When I scroll to the right of the preview screen,
I see that the end-of-line (red vertical line) is at the
end of the last character of the first line. But there are
other lines that are longer and they are truncated.

Any suggestions?

Thanks.
Dts does not like irregular line lengths, as this contrary to a valid
fixed length format. The only reliable way to handle this is to
pre-process the file and pad short lines to the maximum length.

There is a rather old, but still valid PaddingTask I wrote available
here-

Archive
(http://localhost/SQLDTSNet/default.aspx?273)

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.