Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 multiple flatfiles

Author  Topic 

vasu4us
Posting Yak Master

102 Posts

Posted - 2009-08-12 : 18:38:32
I need to import data from one/multiple flatfiles into a table.
I accomplished this using the foreach loop container and expressions.
my package would run through all the files and load data.

My requirment is to sort the files by the time they were moved to the folder and process them in assending order of timestamp(datemodified) on the file.There are situations when files arrive late or not processed on the same day.If i have 2 files one from yesterday and one from today I need to process yesterdays file first and then todays file.

Is this possible in SSIS.

Any inpits are appriciated.
Thanks

vasu4us
Posting Yak Master

102 Posts

Posted - 2009-08-12 : 23:45:52
missed one detail- file name will be something like
jgxy+timestamp.txt
asex+timestamp.txt
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-08-13 : 10:18:16
Yes, it is possible.

You can read all the files into a table, and have a stored procedure that orders the rows as required.
Call this procedure in another foreach loop (ado recordset), and process the files in order.

Maybe Google has an alternative suggestion...
Go to Top of Page
   

- Advertisement -