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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy a row except an identity column

Status
Not open for further replies.

vincer

Programmer
Joined
Mar 12, 2002
Messages
45
Location
GB
I have a table with an identity column and under a certain condition I want to change the value in the identity column.

Is there a simple sql statement that I can use regardless of the number of columns, that will insert all but the identity column from another entry in the same table.
Basically I don't want to name the columns in case a new column is added at a later date and the code doesn't get updated.
Many thanks

V
 
There is no simple statement. You must either code the column names or use dynamic SQL. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top