Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Issue with UPDATE

Author  Topic 

tariq2
Posting Yak Master

125 Posts

Posted - 2012-01-11 : 14:23:32
Thank you in advance for helping to identify what is wrong
with the following UPDATE


UPDATE F_AR
SET Current = 365750
where DocNumber = '11000482' and LEID = '09007' and PeriodKey = 108

yields the following message:
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'Current'.


X002548
Not Just a Number

15586 Posts

Posted - 2012-01-11 : 14:26:45
Since Current is a reserved word (Where is that list of reserved words)

Try

SET [Current] =

Are you sure [Current] is in the table F_AR?

Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
   

- Advertisement -