how to add output parameter to existing sproc

  • I have been given a sproc which needs to have an output parameter added.

    It is the the line @UpdBearingStatusComplete INT OUT.

    when I type the name it has red squiggles under it and syntax check gives the error listed below.

    What am I doing wrong?

    ALTER PROCEDURE [dbo].[UpdBearingStatus]

    @BearingEtching VARCHAR(40),

    @BearingStatusHMIText Varchar(40)=NULL,

    @SpallSizeHMIText VARCHAR(40)=NULL,

    @TestSetID INT = 0,

    @Username VARCHAR(80)='SYSTEM',

    @ManualUpdateReason VARCHAR(255)=NULL

    --trying to add this line

    @UpdBearingStatusComplete INT OUT

    AS

    BEGIN

    DECLARE @BearingID INT=0

    DECLARE @BearingStatusTypeIDNew INT

    DECLARE @SpallSizeTypeIDNew INT

    DECLARE @BearingStatusTypeIDPrev INT

    DECLARE @SpallSizeTypeIDPrev INT

    from Check

    Msg 102, Level 15, State 1, Procedure UpdBearingStatus, Line 18

    Incorrect syntax near '@UpdBearingStatusComplete'.

  • I believe you are missing a comma after the previous line.

  • Ahhh

    my stupidity

    Thank you

  • Trust me when I say that there is a reason why I looked for that early.

    😛

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

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