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)
 DTS Import Query

Author  Topic 

starnold
Yak Posting Veteran

83 Posts

Posted - 2008-04-08 : 12:07:27
I am trying to import several text files into 1 table within SQL. What I want to do though is update a destination column with a constant depending on what file it is from. The source data does not contain this extra column!

File 1 = A
File 2 = B
File 3 = C

So once the files have been imported I will have a column in my SQL table with a value of A or B or C

Any ideas?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-08 : 12:09:53
Use an execute sql task to update this value on your table. Use a variable to hold the file name and use this as a parameter in your query.
Go to Top of Page

starnold
Yak Posting Veteran

83 Posts

Posted - 2008-04-08 : 12:12:35
Can you do this as part of the DTS? I have about 50 files to import and dont want to put a seperate SQL task for each file =(

Good answer though =)
Go to Top of Page
   

- Advertisement -