dbTalk Databases Forums  

How to read 2 lines as 1 record from delimited text files

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


Discuss How to read 2 lines as 1 record from delimited text files in the microsoft.public.sqlserver.dts forum.



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

Default How to read 2 lines as 1 record from delimited text files - 10-26-2005 , 05:29 PM






I am trying to process a delimited text file where 2 lines together makeup 1
single record.

Here's sample data
DD0010001SVC0929D9940000001111111 00800000009400

1 0010001SVC0929D9940000001SERVICE CHARGE

DD0010001SVC0929D9940000002222222 00800000001900

1 0010001SVC0929D9940000002SERVICE CHARGE

DD0010001SVC0929D9940000003333333 00800000009500

1 0010001SVC0929D9940000003SERVICE CHARGE

How would I accomplish this ?

Thanks
Sridevi

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: How to read 2 lines as 1 record from delimited text files - 10-26-2005 , 06:38 PM






Hello Sridevi,

Read the file.
Set the active X transform not to insert on the first of every two rows (1,3,5,7,9...).
Cache the value of the first row. On the second cache those values and not
use a Mid() finction to parse the two cached values and send to the destination
attributes.

Allan


Quote:
I am trying to process a delimited text file where 2 lines together
makeup 1 single record.

Here's sample data
DD0010001SVC0929D9940000001111111 00800000009400
1 0010001SVC0929D9940000001SERVICE CHARGE

DD0010001SVC0929D9940000002222222 00800000001900

1 0010001SVC0929D9940000002SERVICE CHARGE

DD0010001SVC0929D9940000003333333 00800000009500

1 0010001SVC0929D9940000003SERVICE CHARGE

How would I accomplish this ?

Thanks
Sridevi



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.