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)
 Bulk copy and insert rows across tables

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-09-24 : 09:40:37
Paul Kavanagh writes "I have 4 related tables, one if which is a parent. Let's call them:

tbl_car (parent)
tbl_doors
tbl_engine
tbl_engine_horn

Relationships should be fairly clear. tbl_doors and tbl_engine have FK to tbl_car on carID. tbl_engine_horn has FK to tbl_engine on engineID.

I want to create a sproc to replicate the door records, engine records, and related engine horn records from an existing "car", and copy them into rows relating them to a different or new card record (rather than creating them from scratch). What would be the most efficient means of doing this?

Thanks,

Paul"
   

- Advertisement -