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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 SQL Bulk Insert

Author  Topic 

zxswordxz
Starting Member

4 Posts

Posted - 2011-05-26 : 14:50:56
Hi Guys,

I have a table with 20 column and a flat text file with exact 20 column separated by vertical bar(|). I setup a DTS package to automate the bulk insert. It work great but I want to add an additional column call "UpdatedDatetime". How can I setup the DTS package to update the last column "UpdatedDatetime" with the current datatime the text file being updated? Is it possible with another way?

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-05-26 : 15:28:56
Add a column to the table with a default of getdate().
Might need to insert into a view which excludes that column.

Why dts? bulk insert should do it.


==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -