![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm being sent a pipe-delimited text file with insufficient end-of-line characters. When I open the file in notepad, each line DOES NOT terminate correctly, and it reads it as one long string When I open the file in wordpad/word etc, each line DOES correctly terminate and start a new line. Therefore, when I try to read the file in using a text file source, it causes problems. If I open teh file in wordpad, and save, then try again it works.... Unfortunately I have no control over the text file. Is there a solution to this? Thanks. BW |
#3
| |||
| |||
|
|
In message <eadKv50XEHA.3716 (AT) TK2MSFTNGP10 (DOT) phx.gbl>, Beema none (AT) supplied (DOT) com> writes I'm being sent a pipe-delimited text file with insufficient end-of-line characters. When I open the file in notepad, each line DOES NOT terminate correctly, and it reads it as one long string When I open the file in wordpad/word etc, each line DOES correctly terminate and start a new line. Therefore, when I try to read the file in using a text file source, it causes problems. If I open teh file in wordpad, and save, then try again it works.... Unfortunately I have no control over the text file. Is there a solution to this? Thanks. BW Is the line termination inconsistent, or are all lines formatted correctly but with a terminator notepad does not display as you expect? If the former then you will need to parse the file and fix the problems. If the latter then it sounds like there is a perfectly valid terminator, just not one that is visible in notepad. Since you can select or at least set via code any row terminator you want in DTS, this isn't a problem, just make the correct selection. Start by using a hex editor to open the file and identify the terminator character. Then select this correct in the DTS connection UI, or use some ActiveX Script to set it where the character is not available from a keyboard. Coping with text files and abnormal column or row delimiters (http://www.sqldts.com/default.aspx?257) -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com PASS - the definitive, global community for SQL Server professionals http://www.sqlpass.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |