Parse a flat file with multiple layouts to multiple destination tables?
I am trying to load a flat file which mixed multiple data sets. The flat file looks like. 1999XX9999 2XXX99 1999XX9999 2XXX99 3XXXXX999.99 1999XX9999 The first character of the every row defines the record type of the line. I want to create a script component in data flow and parse the raw rows (as the below) and save three output (1, 2, 3) to three different tables. Is it possible? Table1(col1, col2, col3): 999, XX, 9999 999, XX, 9999 999, XX, 9999 Table2(col1, col2): XXX, 99 XXX, 99 Table3(col1, col2): XXXXX, 999.99 Any other way in SSIS if script component cannot do it? The best solution is writing a program to split the file into three files and load them using SSIS?
July 19th, 2012 1:13am

The script component as a source can handle this. Read the flat file as one column. Read the first character and determine what kind of output it is. Split the column accordingly and send it to it's appropriate output.MCTS, MCITP - Please mark posts as answered where appropriate.
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 2:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics