Changing flat file connection file name property

Hi,

I have a task to traverse a folder of CSV files of same format and then populate into one sql server table.

Is there a way where I can change the source CSV file name runtime using FOR EACH loop container for flat file connection manager ?

any help would be much appriciated.

Thanks,

Furrukh Baig

[352 byte] By [FurrukhBaig] at [2007-12-24]
# 1
Yes. By using package expressions. There is an example in the SSIS tutorials that I think does exactly what you want to do assuming all files are in the same directory.
MartinMason at 2007-8-31 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 2
Thanks mate... you are star ...
FurrukhBaig at 2007-8-31 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 3

I'm also trying to do the same thing, except that each folder has a number of different csv files. Would appreciate if someone could give me a link of the sample (as mentioned in the previous post) and whether it's better to have different flat file source for each type of csv file format or should I just use 1 flat file source.

I've tried using 1 flat file source but the number of columns are different for each files and the number of columns in the flat file source isn't dynamic (I've to prespecify it first).

PohTham at 2007-8-31 > top of Msdn Tech,SQL Server,SQL Server Integration Services...
# 4
I'm assuming you're talking about the foreach loop container in the tutorial (ms-help://MS.VSCC.v80/MS.VSIPCC.v80/MS.SQLSVR.v9.en/sqltut9/html/88a973cc-0f23-4ecf-adb6-5b06279c2df6.htm) Can you use a similar concept to loop thru xml files? I have an xml source, 2 sorts and a merge-join. Whenever I change the input file, I need to open my sorts and click ok. How will that work if I need to iterate thru a directory of files?
BergitaRudman at 2007-8-31 > top of Msdn Tech,SQL Server,SQL Server Integration Services...

SQL Server

Site Classified