Re: Output from PL/SQL block

From: Ian Parkin <iparkin_at_iris.bt.co.uk>
Date: 11 Oct 93 10:15:42 GMT
Message-ID: <1993Oct11.091541.20829_at_lssec.bt.co.uk>


>Does anyone know how to produce output from a PL/SQL block
>without SELECTing into a temporary table ?

This is possible in a limited way by embedding the PL/SQL within a 3GL.

I once did this within PRO*C and could set C variables either normally from within the PL/SQl, or when certain exceptions were raised.

From what I recall it was possible to trap 'usual' exceptions like VALUE_ERROR & TOO_MANY rows, but I had great difficulty in finding a way to trap *all* possible exceptions - especially things like ORA-942 : Table or view not found. It may have been that I didn't play around enough defining all the exceptions within the embedded PL/SQL. I seem to remember it being something to do with the fact that the exceptions that I couldn't trap were those that should have been caught at compilation time. This means that if someone drops a table after you have compiled weird & wondeful things may happen at run-time, so be careful !

If you are not too worried about handling exceptions in a graceful way, or like living with an element of danger, then you might like to give it a try.

In the end I used a temporary table :-(.

IAP Received on Mon Oct 11 1993 - 11:15:42 CET

Original text of this message