Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to import top row only and ignore other rows using SSIS Expand / Collapse
Author
Message
Posted Monday, September 23, 2013 5:21 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 4:59 PM
Points: 112, Visits: 1,478
Hi,

I want to import flat files into a sql table. I only require the top row each time a file is imported. How can i set up my SSIS package to import that row only.

The format of the files is:

3178593|M120|010|3206304|AF-01566|20130917|1123|3

0007|900548|00002|||00000.000|TOS

0013|3043213|00001|||00000.000|EOE

0014|270652|00001|75-104||00000.000|TOS

Thanks

Post #1497329
Posted Monday, September 23, 2013 6:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 4:59 PM
Points: 112, Visits: 1,478
Any idea? I believe i can use the conditional Split. But I am struggling to find a way to use this.
Post #1497349
Posted Monday, September 23, 2013 6:44 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, July 24, 2014 1:50 PM
Points: 532, Visits: 448
What are you importing into, SQL Server? How many records in the flat file?
Post #1497358
Posted Monday, September 23, 2013 6:48 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, July 24, 2014 1:50 PM
Points: 532, Visits: 448
have a look at this. Read the first N rows
Post #1497360
Posted Monday, September 23, 2013 7:11 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 4:59 PM
Points: 112, Visits: 1,478
Thanks for your reply. I am trying to import a flat file into an SQL Server table.

The file structure is as follows:


3178593|M120|010|3206304|AF-01566|20130917|1123|3

0007|900548|00002|||00000.000|TOS

0013|3043213|00001|||00000.000|EOE

0014|270652|00001|75-104||00000.000|TOS


I am only interested in importing the first row. On a daily basis i may have multiple files, but the only row I am interested in importing is the top row.
Post #1497370
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse