Jump to content
Xtreme .Net Talk

Unable to use 'Group' as field name in INSERT or UPDATE


Recommended Posts

Guest carloss
Posted

I get the error "Syntax error in Update statement" in the following SQL:

 

UPDATE Tasks SET Group = 'AAA' WHERE Proj = '5'

 

If I change the name of the field from Group to something else the error goes away. Is this a problem with the SQL VB.NET parser?

 

I want to use Group as a field name. Any other way of doing it?

  • Leaders
Posted
divil's suggestion should work, but I'd offer another one: Rename your column. While sql server gives you a workaround (the brackets), I think it's generally a bad idea to use keywords as column names. I'm sure others may differ.
--tim

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...