Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Compile PL/SQL procedure containing ampersands from SQLPLUS
> I wonder is there any way to compile a PL/SQL procedure from
SQLPLUS
> that contains following code fragment:
>
> home_page('param_a=1¶m_b=2');
>
> HTML savvy persons know this is used to pass parameters from
a HTTP
> client request. When compiling the procedure using SQLPLUS,
it
> interprets param_b as a variable and prompts the user to
enter a value
> for it interactively. Of course this is a misbehaviour in
this context.
>
> Any idea to circumvent this? So far, we use TOAD to compile
the stuff.
> But we want to be able to compile using scripts, not relying
on a GUI
> tool.
The answer is at
http://www.bf.rmit.edu.au:81/~orafaq/plus.html#EscapePunct
In short, what you have to do is to change the special
meaning of the & character to some other character for the
duration of your script, and then restore it; for example:
set define "~"
... -- your script
home_page('param_a=1¶m_b=2');
... -- remainder of your script
set define "&"
And there your go!
I hope this helps.
--
This answer is courtesy of QuestionExchange.com
http://www.questionexchange.com/showUsenetGuest.jhtml?ans_id=6051&cus_id=USENET&qtn_id=6268
Received on Thu Oct 21 1999 - 18:08:23 CDT