By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,419 Members | 1,612 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,419 IT Pros & Developers. It's quick & easy.

Incorrect syntax near ','

P: n/a
Hey all I need help to fix this problem.
I run a query like this:

INSERT INTO [RDI_Test.Deleted].dbo.[Nominee]([Given Name],[Surname],
[OwnerID],[TitleID]) SELECT ([Given Name],[Surname],[OwnerID],
[TitleID]) FROM #Temp_Deleted

and got this error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ','.

Can anyone point out the problem? Thank you.
Sep 9 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
There is no need to use parenthesis for the columns in the select list:

INSERT INTO [RDI_Test.Deleted].dbo.[Nominee](
[Given Name],
[Surname],
[OwnerID],
[TitleID])
SELECT [Given Name],
[Surname],
[OwnerID],
[TitleID]
FROM #Temp_Deleted;
--
Plamen Ratchev
http://www.SQLStudio.com
Sep 9 '08 #2

P: n/a
Thanks for the solution. It solved my headache.
Sep 9 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.