Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Compile PL/SQL procedure containing ampersands from SQLPLUS

Re: Compile PL/SQL procedure containing ampersands from SQLPLUS

From: QuestionExchange <USENET_at_questionexchange.com>
Date: 21 Oct 1999 23:08:23 GMT
Message-ID: <1956qx@questionexchange.com>


> I wonder is there any way to compile a PL/SQL procedure from
SQLPLUS
> that contains following code fragment:
>
> home_page('param_a=1&param_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&param_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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US