Reputation: 117
Please I have a PL/SQL package where I'm using HTML code.
In the HTML code I need to use the euro symbol (as its HTML code) but when I use €
the PL/SQL package considers like if i want to pass him a variable and he keep asking me about the value of euro.
Is there any option that makes the use of €
possible in a PL/SQL package?
phrase_conditionnelle := 'Le montant de '||mt_salaire||
' €</b> ;
Upvotes: 0
Views: 1597
Reputation: 191455
It looks like your client is interpreting the €
as a substitution variable:
SQL> select '€' from dual;
Enter value for euro:
You can disable that behaviour with set define off
in SQL*Plus, SQL Developer or SQLcl:
SQL> set define off
SQL> select '€' from dual;
'&EURO
------
€
1 row selected.
SQL> set define on; -- optional but restores behaviour
This is nothing to do with PL/SQL really, or even SQL; it's just client behaviour, at the point you try to compile the package - the client is interpreting the &
before it passes any code to the database for processing. That also means that sessions calling your package don't need to worry about that setting.
Upvotes: 2
Reputation: 3396
this is one of the possible way to do that.
just replace &
by chr(38)
phrase_conditionnelle := 'Le montant de '||mt_salaire|| chr(38)||'euro;' ;
Upvotes: 0