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 2005 Forums
 SSIS and Import/Export (2005)
 Flat File Connection problem

Author  Topic 

Starlet_GT
Yak Posting Veteran

81 Posts

Posted - 2008-02-07 : 05:52:42
I have a SSIS package schaduled for data import, the source file is a flat file connection (*.CSV).

The file is located on a sharing folder over network, the problem is that file name changed daily accordance with date like (data 7-02-2008.CSV), the very next day file name will be (data 8-02-2008.CSV)

How to link such files so that we dont have to change file name in our SSIS package ...?

Detailed way out required.

Thanks,
MIZ

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-07 : 06:12:43
You need to declare a variable in package scope to store the date value. Give evaluate as expression as true and give getdate() as value.
Then map this variable in dynamic properties tab of source file connection.
Go to Top of Page

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2008-02-07 : 06:14:41
If you can move the previously processed file(s) into another folder then it would be just looking at the current CSV to process. Would that work?
Go to Top of Page

Starlet_GT
Yak Posting Veteran

81 Posts

Posted - 2008-02-07 : 07:27:53
Thank you guys ... Visakh16 said rightly ... actually i found an article over internet, i declare a package level variable and created one dump table on local server, the query executes and generates a complete file path with the help of GETDATE() function, now i am using that variable in connection string expression.

Today i schadule it again lets see what will be the results tomorrow, hope it helps.
Go to Top of Page
   

- Advertisement -