Returned value of a stored prcedure

  • Hi All,

    I am running a sproc we have developed and I am getting a -6 as a returned value does anyone know what that actually means.

    TIA

    Doug

  • douglas.allison1 (6/2/2015)


    Hi All,

    I am running a sproc we have developed and I am getting a -6 as a returned value does anyone know what that actually means.

    TIA

    Doug

    Since we can't see what you see, have you looked through the procedure to see why -6 is being returned by the procedure?

  • Yepp It's a basic insert into. I am sure there's something screwy about it. Just being lazy I am sure I'll figure it out. And like always once the light blub moment happens I'll go "Dhooo" in a Homer Simpson stylie.

  • I'm not sure if you realized but Lynn was being quite literal. Open up your procedure and just do a Ctrl-F and look for any RETURN statements. Often RETURN are used for status codes. So work your way back and look why the statement is returning a -6.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • douglas.allison1 (6/2/2015)


    Hi All,

    I am running a sproc we have developed and I am getting a -6 as a returned value does anyone know what that actually means.

    TIA

    Doug

    Only the developer who wrote the stored procedure, anyone who's read the documentation for it, and now you. It's a custom value.


    [font="Arial"]Low-hanging fruit picker and defender of the moggies[/font]

    For better assistance in answering your questions, please read this[/url].


    Understanding and using APPLY, (I)[/url] and (II)[/url] Paul White[/url]

    Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]

  • ChrisM@home (6/2/2015)


    douglas.allison1 (6/2/2015)


    Hi All,

    I am running a sproc we have developed and I am getting a -6 as a returned value does anyone know what that actually means.

    TIA

    Doug

    Only the developer who wrote the stored procedure, anyone who's read the documentation for it, and now you. It's a custom value.

    And anyone who has read the code. The code might not have the comments to explain what the return value means, but the logic to return the value will be there.

  • Thanks for the replies people. I will crawl back under my stone from whence I came. I wrote the sproc. I'll just sleep on it and look afresh in the morning. It usually works 😀

    It's been a frantic last 5 months.

  • douglas.allison1 (6/2/2015)


    Thanks for the replies people. I will crawl back under my stone from whence I came. I wrote the sproc. I'll just sleep on it and look afresh in the morning. It usually works 😀

    It's been a frantic last 5 months.

    Heh... wouldn't that be a -6 months? 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 8 posts - 1 through 7 (of 7 total)

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