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

  • Thread starter Thread starter carloss
  • Start date Start date
C

carloss

Guest
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?
 
divils suggestion should work, but Id offer another one: Rename your column. While sql server gives you a workaround (the brackets), I think its generally a bad idea to use keywords as column names. Im sure others may differ.
 
Back
Top