I am using SQL Server 2008.
I need to clone a record from a master table and all related child tables, there are about 10.
Currently I believe the approach would be to write all the SELECT and INSERT T-SQL statements in a Stored Procedure. Obviously this will take a little time as there are 10 tables, and some of the tables have quite a few columns. Is there another approach which would be quicker to implement ie some form of "cascade copy".
Thanks.
EDIT:
It seems I cannot do:
insert into Table1
select *
from Table1
where Id = 1082
I get:
An explicit value for the identity column in table 'Table1' can only be specified when a column list is used and IDENTITY_INSERT is ON.