Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple record types from Text File

Status
Not open for further replies.

balachandar

Programmer
Apr 16, 2001
88
CA
Hi All,
How do I handle a situation where a text file contains multiple records types . i.e if there are two records
first containing customer name related details and other contains the address. I have to target two different tables based on the record type.

Thanks
Balachandar Ganesan
 
One thing to consider is to replicate the entire text field into a "raw" table into sql server. Can you assume that you will always receive 2 lines in the text file for every "1 customer record"?

If so - set an additional field that is set to 1 or 2 based on the text information. In the dts job, read the first customer detail record, and set the additional field via activex script.

Another option would involve copying to the text file to excel. Add a column to the left of the text and using excels auto fill to populate with 1s and 2s.

Just a couple rough ideas.
 
How do you differentiat between the record types? Is there a field that determines this?

Thanks

J. Kusch
 
Hi All,
Thanks for the suggestions given.
There is a record identifier for determining what record it is .

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top