Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Ascii Files Expand / Collapse
Posted Friday, May 3, 2013 7:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, January 25, 2016 2:49 PM
Points: 26, Visits: 388
Hello EveryOne,
I need some help from you all.

I am trying to build a package where the requirement goes like this.

There is text file which consits of just the column names, so here I am dumping this data into a particular table in DB and running a procedure which takes this dumped data and creates the tables accordingly, which in later has to be loaded with ASCII file data.

So here comes the problem, we are getting a bunch of files (.asc files) which doesn't have the column names in it, It just got the data in it.

There are totally 5 different regions, for one region I am getting the files having same number of columns in every file. But for other 4 regions I am getting the files that have different number of columns in each file.

So here I am taking a foreach loop and a DFT. In DFT I am taking a FlatFile source and oledb destination. In the FlatFile Source the connection manager I have chosen Fixed Width Format and in the columns tab I am manually selected all the columns.

So these foreach loop works fine if all the files have the same number of columns. but it doesn't if it has different number of columns in the files.

So could you all please give your valuable suggestions how to handle these files which doesn't have the column names.

Thanks every one
Post #1449212
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse