dbTalk Databases Forums  

Extraneous linefeeds when exporting to text file

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


Discuss Extraneous linefeeds when exporting to text file in the microsoft.public.sqlserver.dts forum.



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

Default Extraneous linefeeds when exporting to text file - 08-19-2004 , 03:15 AM






I'm using DTS to export from a view to a tab-delimited text file.
Some of the lines are getting saved with unwanted linefeeds inserted
before the actual end of the line, which messes up the column
alignment.

For example, here's what it should look like:

131100 FREEWAY Napa LINCOLN AVE Trancas St 0
131110 FREEWAY Napa Trancas St Oak Knoll Ave 0
131120 FREEWAY Yountville Oak Knoll Ave Yountville Cross Rd 0
131130 FREEWAY Napa Yountville Cross Rd Oakville Cross Rd 0


But here's what I get:

131100 FREEWAY Napa LINCOLN AVE Trancas St
0
131110 FREEWAY Napa Trancas St
Oak Knoll Ave
0
131120 FREEWAY Yountville Oak Knoll Ave
Yountville Cross Rd 0
131130 FREEWAY Napa Yountville Cross Rd Oakville Cross Rd 0

I've removed several of the unaffected columns to make it more
readable here. The actual view has 16 columns. The linefeeds are
always inserted near the end of the line, but one or two columns
early.

Is there some parameter somewhere that could fix this? I'm at a loss.

Thanks,

Allan

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

Default Re: Extraneous linefeeds when exporting to text file - 08-22-2004 , 04:57 AM






In message <d563b154.0408182255.1afcdb89 (AT) posting (DOT) google.com>, Allan Cady
<allancady (AT) yahoo (DOT) com> writes
Quote:
I'm using DTS to export from a view to a tab-delimited text file.
Some of the lines are getting saved with unwanted linefeeds inserted
before the actual end of the line, which messes up the column
alignment.

For example, here's what it should look like:

131100 FREEWAY Napa LINCOLN AVE Trancas St 0
131110 FREEWAY Napa Trancas St Oak Knoll Ave 0
131120 FREEWAY Yountville Oak Knoll Ave Yountville Cross Rd 0
131130 FREEWAY Napa Yountville Cross Rd Oakville Cross Rd 0


But here's what I get:

131100 FREEWAY Napa LINCOLN AVE Trancas St
0
131110 FREEWAY Napa Trancas St
Oak Knoll Ave
0
131120 FREEWAY Yountville Oak Knoll Ave
Yountville Cross Rd 0
131130 FREEWAY Napa Yountville Cross Rd Oakville Cross Rd 0

I've removed several of the unaffected columns to make it more
readable here. The actual view has 16 columns. The linefeeds are
always inserted near the end of the line, but one or two columns
early.

Is there some parameter somewhere that could fix this? I'm at a loss.

I've never seen DTS do this before. Are you sure there are no linefeeds
actually in the data? It may be quite hard to see depending on the tool
you use to view the data. Perhaps try Query Analyser text view, or
actually check what characters are there using the ASCI function in
T-SQL.

When viewing the file, it isn't word wrap playing tricks on you ? I
would also try the file in a hex editor to see what the real character
codes are. Is it a full CR + LF or perhaps just LF. Sometimes other
characters can e represented as a line break in the text editor, even
though they are not real CR and LFs. Any discrepancy my help in tracking
it down.

--
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.