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)
 Adding Date based on File Date

Author  Topic 

leslieb
Starting Member

23 Posts

Posted - 2009-02-03 : 20:36:41
I created several flat files each day and these are added to the SQL database via a Stored Package. I would like to be able to add a column that has the date that the flat file was created. Does anyone know if this is possible and if so how it could be done?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-02-03 : 23:23:17
Can't you create date column with Default GETDATE() and loops files with For-Each-Loop container to import from Flat files to SQL Server?
Go to Top of Page

leslieb
Starting Member

23 Posts

Posted - 2009-02-03 : 23:30:29
In the files that I receive some are for the current date and some the previous working day. So even using GETDATE() and GETDATE()-1 will not work when weekends occur.
Go to Top of Page
   

- Advertisement -