Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy and modify a set of rows into the source table
Message
From
31/01/2011 11:31:21
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01497974
Message ID:
01497977
Views:
36
Thanks for the reply Sergey

These table are subject to frequent addition of columns, so I was hoping to find a way to do it without specifying all the columns - something like SCATTER and GATHER
NSERT INTO mytable
SELECT col1, col2, <newValueCol3>, col4, col5, ...
  FROM mytable
  WHERE Col3 = <ValueCol3>, ColN = <ValueColN>
>I need to select a set of rows from a table, based on two columns
>, give one of those columns a new value in the selected set, and then insert the selected set into the source table.
>I can bring them down from the server, do the changes and then insert them one at a time, but I'm not crazy about that all those trips to and from the server, I'd rather do it all on the server, but can't figure out how
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform