Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie Help with '&' please
clarkr1 wrote
>How do you INSERT an '&' without getting
>prompted to insert values?
You can either prefix the ampersand & with the SQL*Plus escape character, or you could redefine the character that is used to prompt for parameters.
SET ESC[APE] {\|c|OFF|ON}
SET DEF[INE] {'&'|c|OFF|ON}
The default escape character is \. This also implies you need to type \ twice if you want a single \ character:
select 'C:\\Temp'
from dual;
Use SHOW ESCAPE to see the current setting (or SHOW ALL to see all settings).
select 'You \& me'
from dual;
If you do not use parameters, then you could simply use
set define off
select 'You & me'
from dual;
Otherwise, you could use, for example, the ^ character for parameter substitution:
set define '^'
Note that the single quotes are required. If you forget them, you'll get strange error messages the second time you issue the SET command.
Arjan. Received on Sun Mar 21 1999 - 03:07:56 CST
![]() |
![]() |