Using & character in PL/SQL [message #209570] |
Fri, 15 December 2006 10:28 |
ying
Messages: 143 Registered: May 2002
|
Senior Member |
|
|
Hi,
I have a sql file which run a certain query. In my PL/SQL I have a varchar2 variable which use to store text a below:
user_html := user_html || 'You may click <a href="http://www.myhost.com/padoc/mysystem/viewpreobs.jsp?p_id='||trng_rec.empnumber||'&e_id='||trng_rec.event_id||'">here</a> to view your employee's details<br><br>';
I have problem which this statement, as below:
1.) When I run the file in SQL plus, it prompt me to enter the e_id
2.) When viewing, the "employee's" become employee?s
Pls advise....
Ying
|
|
|
|
Re: Using & character in PL/SQL [message #209606 is a reply to message #209572] |
Fri, 15 December 2006 19:45 |
ying
Messages: 143 Registered: May 2002
|
Senior Member |
|
|
ok...thank you. Manage to manually exec via sql plus. Well, due to we are required schedule and cron the .sql to exec in certain date and time...so, do I need to specify the "Set define off" in my .sql file???
By the way, How do I use "'" in the PL/SQL as I treat the "'" (quote string) as a terminated string.
pls advise.....
Ying
|
|
|
Re: Using & character in PL/SQL [message #209617 is a reply to message #209606] |
Fri, 15 December 2006 22:23 |
|
ebrian
Messages: 2794 Registered: April 2006
|
Senior Member |
|
|
If you intend on running the script in SQL*Plus, then you'll need to specify set define off at the top of your script. To use a single quote, you should just use two single quotes ''. If you are using 10g, you can use the alternative quoting mechanism to accommodate the single quote.
|
|
|