Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert with subquery
Message
From
21/05/2012 14:11:12
 
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
01543829
Message ID:
01543961
Views:
29
>>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!
Previous
Reply
Map
View

Click here to load this message in the networking platform