Posts: 1324 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
Copy Entire Row of Data in sql - 11/22/2006 9:35:49
I wish to copy an entire row of data on an sql server and paste it back into the same table with a new primary key (OHOrderNum).
I can do this manually by running a query for order number 1, then inserting all of the same data from order number 1 and let sql assign a new order number, then use the @@identity to get the order num; however, there is a lot of fields and just too much room for error.
So, is there a way to copy the entire line and insert it back into the same table then use the @@identity to get the new order number?