Re: Trouble coverting a Procedure into a "STORED" procedure

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Fri, 06 Feb 2004 21:22:52 +0000
Message-ID: <t318205hsln9hq425skek0h12ffdbp4k4l_at_4ax.com>


[Quoted] [Quoted] On Wed, 04 Feb 2004 23:12:51 -0800, Daniel Morgan <damorgan_at_x.washington.edu> wrote:

>remove DECLARE it does not belong in any proc or function

[Quoted]  A minor point with this statement: do you more specifically mean that DECLARE doesn't belong in the top-level block of a stored procedure/function? (Which is clearly true because it wouldn't compile otherwise).

 But if your stored procedure has nested blocks, then these blocks can have DECLARE clauses; it can be good practice to have declarations close to usage in various cases.

 For example, declaring exceptions in blocks around individual statements where you want to catch a specific exception, handle it and continue as appropriate.

-- 
Andy Hassall <andy_at_andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Received on Fri Feb 06 2004 - 22:22:52 CET

Original text of this message