HELP! Getting "Incorrect Syntax" error while making Stored Procedure.

  • Getting an error after clicking "Check Syntax" button.  "Error 156: Incorrect Syntax near the keyword 'Set'."

    Here is a screenshot of the properties of the table that is being modified: http://www.bravobsp.com/misc/Showstable.jpg

    Here is my stored procedure.  I plan on using it to modify a row in a table.  My database is SQL 2000

    CREATE PROCEDURE UPDATESHOW

    @ShowID   varchar (50),

    @HeadlinerID     varchar (50),

    @Support    varchar (50),

    @VenueID     varchar (50),

    @MarketID     varchar (50),

    @ShowDate    datetime (8),

    @Budget     numeric (9)

    AS

    UPDATE Shows

    Set HeadlinerID = @HeadlinerID,

    Set Support = @Support,

    Set VenueID = @VenueID,

    Set MarketID = @MarketID,

    Set ShowDate = @ShowDate,

    Set Budget = @Budget

    Where ShowID=@ShowID

    GO

    Any help would be greatly appreciated.

    Thanks

    Jeff Wood

    Boise, ID

  • Jeff - you need to "SET" just once...like so:

    CREATE PROCEDURE UPDATESHOW

    @ShowID varchar (50),

    @HeadlinerID varchar (50),

    @Support varchar (50),

    @VenueID varchar (50),

    @MarketID varchar (50),

    @ShowDate datetime (8),

    @Budget numeric (9)

    AS

    UPDATE Shows

    Set HeadlinerID = @HeadlinerID,

    Support = @Support,

    VenueID = @VenueID,

    MarketID = @MarketID,

    ShowDate = @ShowDate,

    Budget = @Budget

    Where ShowID=@ShowID

    GO







    **ASCII stupid question, get a stupid ANSI !!!**

  • Dear Sushila,

    I appreciate your help.  That did the trick. 

    You have helped me a great deal.

    Thanks

    Jeff

  • anytime Jeff!







    **ASCII stupid question, get a stupid ANSI !!!**

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply