SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Help SSIS to import odd text file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 07/10/2014 :  12:35:37  Show Profile  Reply with Quote
I have a text file in an odd format that was created by a custom app for tracking serial numbers.

The format is:

ordernumber, numberofserial#s, serial1, serial2, etc...

Example lines:

1234, 2, 010101010101, 010101010102
1235, 1, 010101010103
1236, 4, 010101010104, 010101010105, 010101010106, 010101010107

I need SSIS job to daily truncate a table and repopulate with:

order, serial
order, serial

1234, 010101010101
1234, 010101010102

Any guidance appreciated.

Oh this is in SQL 2008 but no SSIS forum here for 2008.


Flowing Fount of Yak Knowledge

2684 Posts

Posted - 07/11/2014 :  12:32:53  Show Profile  Reply with Quote
Your best option is to use a script component to parse the data and output multiple rows. See http://beyondrelational.com/modules/2/blogs/106/posts/11126/ssis-script-component-split-single-row-to-multiple-rows.aspx for an example. Then you take that output and use it to build your table in SQL
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000