Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert with subquery
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
01543829
Message ID:
01543961
Vues:
31
>>Hi -
>>
>>I am under the impression that an SQL INSERT statement can be used with a subquery to insert multiple rows at a time. My attempt
>>
>>INSERT INTO [myData].[dbo].[TempRevenues2] (fisyear) values ((SELECT DISTINCT fisyear from RTA_REVENUES))
>>
>>is producing an error. Do I have something wrong in the syntax or what am I missing?
>>Thanks
>
>Hi Don,
>
>You should do:
>
>
>INSERT INTO [myData].[dbo].[TempRevenues2] (fisyear) SELECT DISTINCT fisyear from RTA_REVENUES
>
Thanks Hugo!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform