Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Conditional compiles in PL/SQL...?
A copy of this was sent to bobdev_at_fc.hp.com
(if that email address didn't require changing)
On 8 Dec 1999 18:24:19 GMT, you wrote:
>I have a stored procedure (SP) which works fine on System A. My database on
>system B has a database which lacks a table that part of the SP references.
>
>What I'd like to be able to do is bracket sections of the SP which are to be
>*ignored* on system B when I compile the SP into the database. Assume, of
>course, that the SP is syntactically correct in either case.
>
>How do I do this? A good deal of surfing time has so far yielded no answer.
>Is there a #pragma or some sort of #define which lets me drop out sections
>of the SP at compile time?
>
>Thanks!
No there isn't. What others have done is to use dynamic sql to access objects whose size/shape/existence might vary from system to system. That way, you can at run time decide what sql to execute and the plsql is not bound to those objects at compile time but rather at run time.
--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Dec 08 1999 - 13:41:39 CST
![]() |
![]() |