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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSIS import/update from multi record type flat file

Status
Not open for further replies.

Kamalis14

Programmer
Apr 14, 2004
2
US
I am currently working on project where I need to insert, delete and update data from a text file I receive into multiple tables. So the file has multiple recordset types(50 to be exact) and each record has a code to perform an -Update, Insert, or Delete to the destination table. Also when I receive the records they are not sorted. I need to sort the sets for each destination table and then read the the sorted set sequentially and perform the correct action.

Currently I am importing the record via flatfilesource into one column. I am using a script component here that splits the column by delimnating character ('|') and inserting into outputs (50 outputs) including the fields needed for each table(currently testing with only 3). The outputs are sorted by sortkey field and when I add the record to the output I perform data type transforms needed for each field(most are strings but I need to convert some dates, numbers ect..).

***is there a better way of accomplishing this?***

(ps. I could use the conditional split and the derive column into the 50 different outputs but it was giving me errors that were almost forcing me to use a nvarchar type instead of a varchar type during some of the field transformations.)


At this point I would need to read through each of the outputs sequentially and perform the update, insert or delete into the needed table. Would I have to create 50 script components with an ADO.net recordset adapter to update the tables for each of the outputs? I am hoping you can help come up with a better way to accomplish all of this.

 
does each recordset affect a different table?

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top