search for & in a string [message #371402] |
Fri, 13 October 2000 07:37 |
Steven
Messages: 13 Registered: May 1999
|
Junior Member |
|
|
Can anyone tell me how to search for an & in a string
I assume there is an escape key but '%\&%' does not work
Thanks in advance
Steven
|
|
|
Re: search for & in a string [message #371407 is a reply to message #371402] |
Fri, 13 October 2000 11:38 |
Prem
Messages: 79 Registered: August 1998
|
Member |
|
|
steven,
You can use something like
SELECT * FROM EMP
WHERE INSTR(ENAME , '&') > 0;
This is similar to the above requirement. If u r executing the sql from sql*plus, you can set the
SET DEFINE '~'
this will not treat & as an input character. Now if you say
SELECT * FROM EMP WHERE ENAME LIKE '%&%'
it will work
hth
Prem :)
|
|
|
|