locked
Incorrect syntax near '21001'. RRS feed

  • Question

  • SQL server 2014

    When I 

    update jix set ParamData = 'FCSQL01' where ParamEntry = 'SQLServer'
    go

    These error messages are coming up

    Msg 102, Level 15, State 1, Procedure jini_update, Line 153
    Incorrect syntax near '21001'.
    Msg 102, Level 15, State 1, Procedure jini_update, Line 200
    Incorrect syntax near '21001'.
    Msg 102, Level 15, State 1, Procedure jini_update, Line 243
    Incorrect syntax near '22222'.
    Msg 102, Level 15, State 1, Procedure jini_update, Line 269
    Incorrect syntax near '22222'.
    Msg 102, Level 15, State 1, Procedure jini_update, Line 365
    Incorrect syntax near '22222'.
    Msg 102, Level 15, State 1, Procedure jini_update, Line 402
    Incorrect syntax near '22222'.
    Msg 102, Level 15, State 1, Procedure jini_update, Line 424
    Incorrect syntax near '@catch_ERROR_NUMBER'.


    What is wrong?

    Friday, November 15, 2013 1:05 PM

Answers

  • YOu apparently have a trigger which is calling a stored proc jini_update.  You need to look at the stored proc and see why it is erroring.

    • Proposed as answer by Martin. M Friday, November 15, 2013 1:18 PM
    • Marked as answer by Charlie Liao Sunday, November 24, 2013 12:41 PM
    Friday, November 15, 2013 1:07 PM
  • It seems that you have a trigger running on the table "Jix".

    Just run this.

    SELECT * FROM <DATABASE_NAME>.<SCHEMA_NAME>.SYSOBJECTS
    WHERE xtype='TR'

    Now you know the triggers in your database. Or if you want to know the trigger running on the table you can use.

    SP_HELPTRIGGER '<TABLE_NAME>'

    Now use.

    SP_HELPTEXT <TRIGGER_NAME>

    Check the code and then you are ready to solve your problem on your own.

    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    • Marked as answer by Charlie Liao Sunday, November 24, 2013 12:41 PM
    Friday, November 15, 2013 1:38 PM

All replies

  • YOu apparently have a trigger which is calling a stored proc jini_update.  You need to look at the stored proc and see why it is erroring.

    • Proposed as answer by Martin. M Friday, November 15, 2013 1:18 PM
    • Marked as answer by Charlie Liao Sunday, November 24, 2013 12:41 PM
    Friday, November 15, 2013 1:07 PM
  • Hi,

    try to do that 

    update jix set ParamData = ['FCSQL01'] where ParamEntry = ['SQLServer']
    go

    Best Regards.

    Friday, November 15, 2013 1:14 PM
  • sp_helptrigger jix
    

    you will get trigger on this table then,

    sp_helptext <triggername> 

    go through the code.




    Friday, November 15, 2013 1:18 PM
  • It seems that you have a trigger running on the table "Jix".

    Just run this.

    SELECT * FROM <DATABASE_NAME>.<SCHEMA_NAME>.SYSOBJECTS
    WHERE xtype='TR'

    Now you know the triggers in your database. Or if you want to know the trigger running on the table you can use.

    SP_HELPTRIGGER '<TABLE_NAME>'

    Now use.

    SP_HELPTEXT <TRIGGER_NAME>

    Check the code and then you are ready to solve your problem on your own.

    Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

    • Marked as answer by Charlie Liao Sunday, November 24, 2013 12:41 PM
    Friday, November 15, 2013 1:38 PM