Msg 156, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'WHERE'. RRS feed

  • Question

  • User-665774939 posted

    UPDATE dbo._Procedure
    SET DESCRIPTION='Rabies Vaccination',

    I put this update statement but it keeps coming back as an error and I'm not sure why. What did I do wrong?

    Tuesday, July 21, 2020 10:40 PM

All replies

  • User475983607 posted

    Does the Procedure table actually start with an underscore?  

    Tuesday, July 21, 2020 10:46 PM
  • User-665774939 posted

    yes it does

    Tuesday, July 21, 2020 10:47 PM
  • User77042963 posted

    You can only UPDATE a table like this not a stored procedure.

    Tuesday, July 21, 2020 11:24 PM
  • User77042963 posted

    UPDATE dbo.yourtableName
    SET DESCRIPTION='Rabies Vaccination'

    No comma before WHERE clause.

    If the dbo._Procedure is your silly table name, you simply remove the extra comma before WHERE clause.

    Tuesday, July 21, 2020 11:26 PM