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)
 Exporting from Text file to Table

Author  Topic 

sreehari
Starting Member

37 Posts

Posted - 2006-07-13 : 07:45:03
Hi all

I have a text file containing some information regarding employee
empno,ename,sal
100,aaa,3434
101,bbb,3434
102,ccc,7575

i have exported this text file and create a table with the name as employee...

Now, i want to set up a DTS package schedule that will automatically update the employee table as per the employee records in the text file.

I tried it...but the when ever the DTS schedule is run..it is appending all the employee information from the begining of the text files...where as i want to update the table with latest addition of emp records in the text file..

Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2006-07-13 : 08:09:46
Import into a staging table then update from there.
I would use bcp rather than dts for this.

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

- Advertisement -