Splitting lines with different columns
Hi, I have a problem with integration services using Flat File. The problem is, I have one file with 4 types of register, like (First Line: Header, Second: Customer Details, Third: Customer Address, Fourth: Financial Customer Details. In order, I have to insert all of them in different tables. Remember that there are many customers. Does anybody has some clue?
September 26th, 2011 5:27pm

My opening remark is you need to use a conditional split to form 4 separate files. To do so you can have your input file set to be treated as a single column file. Examples: A brief one: http://www.bimonkey.com/2009/06/the-conditional-split-transformation/ See this thread: http://social.msdn.microsoft.com/Forums/en-US/sqlintegrationservices/thread/2285e99f-429a-4495-84bd-66c34f906bc6/ Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2011 5:36pm

How can I separate in 4 files? It will be executed automatically....
September 26th, 2011 7:03pm

This article explains in details how: SSIS Nugget: Splitting a file into multiple files http://consultingblogs.emc.com/jamiethomson/archive/2005/12/04/SSIS-Nugget_3A00_-Splitting-a-file-into-multiple-files.aspxArthur My Blog
Free Windows Admin Tool Kit Click here and download it now
September 26th, 2011 7:06pm

ArthurZ has the correct solution for you. My only question is do you have a way to indentify each type of record while reading the file. Otherwise you will not be able split it up.
September 26th, 2011 9:15pm

The problem is, I have one file with 4 types of register, like (First Line: Header, Second: Customer Details, Third: Customer Address, Fourth: Financial Customer Details. In order, I have to insert all of them in different tables. Remember that there are many customers. Does anybody has some clue? Can you provide us a sample data. How do you diffrentiate the 4 headers? Do they have these 4 values you have mentioned before the data coming in?My Blog | Ask Me
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2011 6:55am

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

Other recent topics Other recent topics