Stored Procedure Boundaries

  • milos.radivojevic (2/26/2014)


    dj341 (2/26/2014)


    robert.diley (2/26/2014)


    How odd. I actually tried running this (copy/pasted the code) and got the following:

    (1 row(s) affected)

    Msg 8134, Level 16, State 1, Procedure TestProc, Line 6

    Divide by zero error encountered.

    No 'A' at all....

    It may be that you're only looking at the "Messages" Pane. Take a look at both the "Results" and "Messages" panes.

    You can see all resulted lines when you set Results to Text in the SQL Server Management Studio to force query execution results to be displayed as text.

    + 1

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • Got it right, for the wrong reason.

    I thought that only select A was part of the stored proc. and that execution of the stored proc (select A) would be followed by the standalone select divide by zero.

  • j-1064772 (3/10/2014)


    Got it right, for the wrong reason.

    I thought that only select A was part of the stored proc. and that execution of the stored proc (select A) would be followed by the standalone select divide by zero.

    :hehe:

  • Actually a very good question. It's simple yet gies very clear point about proc boundaries. 🙂

Viewing 4 posts - 31 through 33 (of 33 total)

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