February 23, 2009 at 1:41 am
I am using SQL 2005.
Thanks
Dhamodharan P
February 26, 2009 at 1:23 am
Hi Hari..
I need some clarification in SSIS.
How to get the Source file name from table for Data flow Taks?
I want to load the data from one CSV file. But file name should come from the table because every cycle file name will vary. Instead of hard coding in data flow task (FLat file Source), is there any other way to do this?
February 28, 2009 at 12:03 am
You can achieve this in different way...
If you want to store file path in database then do following thigs:
1. Create a package variable say User::FilePath of type string.
2. Initialze this variable using Eqecute SQL Task (in Result Set map the variable with query result)
3. In Flat file connection manager properties, click on Expressions and assign ConnectionString value with @[User::FileName] . So your connection string will be changed according to @FilePath variable.
You can use ForEach Loop container as well if you can distinguish the required file types in the source folder.
March 1, 2009 at 9:34 pm
Thanks Hari. Its working fine.
But things is initially we need to specify the file name then only we can go to the properties and change the connection string as user variable.
One more help from you.
I need to load the data from excel file assume that its contains two columns. Excel file name contains the period is like "M0209". So file name will be M0209.xls. My target table is having 3 columns one for period and another two cols is same source column.
How to read the file name and same value needs to be inserted into period column in the database.
Can you help me on this?
Thanks
Dhamodharan P
March 1, 2009 at 10:41 pm
For Flat file connection its working file. If suppose my source is excel file, what are all changes i need to do.
Thanks
Dhamodharan P
February 8, 2010 at 10:41 am
ok
Viewing 6 posts - 16 through 20 (of 20 total)
You must be logged in to reply to this topic. Login to reply