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
 General SQL Server Forums
 New to SQL Server Programming
 insert filename and current data and time to table

Author  Topic 

ahmadjamalkhan
Starting Member

36 Posts

Posted - 2009-05-15 : 06:02:54
Hi
I am using DTS to import csv files , excel files , text files into sql server 2000 tables.

So for TableA , i am importing data from excel sheet. I want to add three more column to this TableA , filename ,filepath, Transtime.

So that When i run my DTS it should insert the filename , filepath and the time when the dts was invoked into this column.

This will help me knowing what files have already been imported into the database.

Thanks

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-05-15 : 06:33:45
while select data from excel(in transformation Properties) use query option, then u add what ever u want..


Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled
Go to Top of Page

ahmadjamalkhan
Starting Member

36 Posts

Posted - 2009-05-15 : 12:26:25
Hi Thanks .
I found quite a few sys* but not sure under which i would get the excel file name which i am importing or have imported .
under sysfiles i could see db details where its data and log files are kept , but nothing about importing file.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-15 : 13:14:48
one way to get filename is to create a file connection object in script task and then use it to retrieve the name

http://www.sqldts.com/238.aspx
Go to Top of Page
   

- Advertisement -