Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS

Status
Not open for further replies.

TomBarrand

Programmer
Aug 9, 2000
162
GB
I have a table that has 10 columns in it. The data in two of the columns need to populate table A, the data in 4 of the columns needs to populate table B and the data in the other 4 columns needs to populate table C.

How do I go about do this? I think it is a DTS, but I am not sure how to customise it.

Thanks
 
If I'm not missing the point (which I could be) then something like the following SQL would do what you have outlined.

insert into table_a(col_1,col_2)
select col_1,col_2 from source_table

insert into table_b(col_3,col_4,col_5,col_6)
select col_3,col_4,col_5,col_6 from source_table

insert into table_c(col_7,col_8,col_9,col_10)
select col_7,col_8,col_9,col_10 from source_table

Hope this helps.

Rick Cole
 
Thats exactly what I was thinking. I just wondered if the best way to execute this would be to use a DTS.

Cheers,

Tom
 
Well DTS could also do the above. You could use 6 different data source(s) and 3 transformations, which could then run all at the same time.

All depends on how it best fits in to what you want do. As a one off I would chose SQL. If it’s a regular job then maybe DTS.

Rick Cole.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top