Home Forums SQL Server 2005 Development Using Cursors Inside Stored procedure problem RE: Using Cursors Inside Stored procedure problem

  • You are not moving the cursor ahead.

    WHILE (@@FETCH_STATUS=0)

    BEGIN

    if @TransCode='TR001'

    BEGIN

    SET @p1 = dbo.AddFltAmount(@p1,@Flt_Amount) --here where i am getting error

    END

    FETCH NEXT FROM Cur_Flt_Amt INTO @TransCode, @Flt_Amount

    END