Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Proper form of INSERT INTO SELECT ...
Message
De
06/02/2002 11:10:07
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
 
 
À
06/02/2002 10:45:57
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00616056
Message ID:
00616081
Vues:
22
Problem solved :)

FYI: The answer is to leave out the VALUES keyword.
INSERT INTO basetable (col2, col3, col4) (SELECT col2, col3, col4 FROM Inserted)
>I am trying to create an INSTEAD OF INSERT trigger for a view. The base table has an auto-incremented identity column. Intuitively, I would like to write the following statement:
>
>
>INSERT INTO basetable (col2, col3, col4) VALUES (SELECT col2, col3, col4 FROM Inserted)
>
>Unfortunately, that statement is not allowed in SQL2000. Can anyone suggest the correct way to do this or point me in the right direction?
>
>TIA,
>
>Keith Payne
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform