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.
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 = AFile 2 = BFile 3 = CSo once the files have been imported I will have a column in my SQL table with a value of A or B or CAny 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. |
|
|
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 =) |
|
|
|
|
|