![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm Jennifer Kenney, I'm mostly SQL/TSQL, but I'm using DTS for obvious DTS things, and I've got an issue with DTS respecting the Row Delimiters in a text file (source) connection. The fixed-width text file has a CRLF row delimiter, visible when I read it in Word with the view options set to view all, and when I checked to see if I could import it into Excel, it read the CRLF just fine BUT!!! The individual rows are sometimes shorter than they ought to be; the last field in the row isn't always present, and my data pump, instead of seeing the Row Delimiter and moving the data down to the next row, is filling data into the trailing field from the next record, then cutting off record 2 after the 30 chars that field allows and starting the next row with record 3. Any advice? JBK |
#3
| |||
| |||
|
|
Jennifer, Then the file is not fixed-width in a strict sense. If you opened the file and filled up missing width it would be working. Ilya "Jennifer Kenney" <jkenney (AT) pembrooke (DOT) com> wrote in message news:uqsvEUATFHA.2680 (AT) tk2msftngp13 (DOT) phx.gbl... Hi, I'm Jennifer Kenney, I'm mostly SQL/TSQL, but I'm using DTS for obvious DTS things, and I've got an issue with DTS respecting the Row Delimiters in a text file (source) connection. The fixed-width text file has a CRLF row delimiter, visible when I read it in Word with the view options set to view all, and when I checked to see if I could import it into Excel, it read the CRLF just fine BUT!!! The individual rows are sometimes shorter than they ought to be; the last field in the row isn't always present, and my data pump, instead of seeing the Row Delimiter and moving the data down to the next row, is filling data into the trailing field from the next record, then cutting off record 2 after the 30 chars that field allows and starting the next row with record 3. Any advice? JBK |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
I handle things like this with ActiveX scripts. My preference for text manipulations is PERL. If you have ever programmed in C or even C++, then PERL isn't to terribly difficult and is well suited for text manipulation. I think you'd want to read the file line by line, each time into a local string variable, and check the length of the string, then output that string with additional spaces to ensure it is the proper length. Ugh. So do a connection before the data pump and adjust the text file |
#6
| |||
| |||
|
|
shumaker (AT) cs (DOT) fsu.edu> wrote in message news:1114716950.450143.264010 (AT) o13g2000cwo (DOT) googlegroups.com... I handle things like this with ActiveX scripts. My preference for text manipulations is PERL. If you have ever programmed in C or even C++, then PERL isn't to terribly difficult and is well suited for text manipulation. I think you'd want to read the file line by line, each time into a local string variable, and check the length of the string, then output that string with additional spaces to ensure it is the proper length. Ugh. So do a connection before the data pump and adjust the text file there? |
#7
| |||
| |||
|
|
Hi, I'm Jennifer Kenney, I'm mostly SQL/TSQL, but I'm using DTS for obvious DTS things, and I've got an issue with DTS respecting the Row Delimiters in a text file (source) connection. The fixed-width text file has a CRLF row delimiter, visible when I read it in Word with the view options set to view all, and when I checked to see if I could import it into Excel, it read the CRLF just fine BUT!!! The individual rows are sometimes shorter than they ought to be; the last field in the row isn't always present, and my data pump, instead of seeing the Row Delimiter and moving the data down to the next row, is filling data into the trailing field from the next record, then cutting off record 2 after the 30 chars that field allows and starting the next row with record 3. Any advice? JBK |
#8
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |