February 19, 2007 at 3:34 pm
Hello,
A developer wants to have all the tables in a Dev database truncated every night and then re-loaded with data from a Production database. It is important that the values of the Production Identity column come over to the Dev tables.
Using SET IDENTITY_INSERT ON works, but it requires that the insert statement list all the column names. Too much work!!
Is there a way that the Identity property of the RecID columns in the Dev tables could be temporarily "dropped"? If so, I could perform insert (including the unique identity values), and then "re-add" the Identiy property to the RecID column in the Dev table.
I can't find T-SQL code in BOL telling how to alter a column to remove its Identity property.
TIA,
Elliott
February 19, 2007 at 3:37 pm
It is a good bit of work to include all of the columns.
However sql2005 allows you to right click the table and script insert. Then use the Insert into mytable (yada) yada values for your select values.
daralick
February 19, 2007 at 3:53 pm
Thanks Derelict (did I catch your ref, correctly?)
I'm still hoping for a T-SQL solution to Identity so that I don't have to cut and paste between virtual servers.
Elliott
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply