October 3, 2006 at 3:41 am
I have a DTS package where I need to retrieve data from two seperate text files and import them into different columns within the same table.
The problem I am having is that I have the two text file connections within DTS connected to the single table, but when I run the DTS runs, the data from the first text file inserts into the table from record1 but then the second text file inserts into the table after all the records from the first text file.
I am after the first text files inserting into the table from record1 columns 1 to 5, and the second text file from record1 column 6.
I am really stuck with this one so hope someone can help me.
Thanks.
Pete.
October 3, 2006 at 9:49 am
Import both text files into staging tables then use an SQL query in the Transform Data task to join the two staging tables. The query would look like something like this:
select t1.col1,
t1.col2,
t1.col3,
t1.col4,
t1.col5,
t2.col6
from table1 t1 join table2 t2 on common_key
Hope this helps.
Greg
Greg
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply