Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy and modify a set of rows into the source table
Message
 
 
To
31/01/2011 11:10:41
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01497974
Message ID:
01497975
Views:
49
INSERT 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
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform