Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy and modify a set of rows into the source table
Message
 
 
À
31/01/2011 11:10:41
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01497974
Message ID:
01497975
Vues:
50
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform