Link to home
Start Free TrialLog in
Avatar of finance_teacher
finance_teacher

asked on

ORACLE -- easy SQL search, special characters ?

How can I get the below to find all 'ACI O&A' records ?

Currently Oracle SQL Developer prompts me since it thinks "&" is a parameter.

select *
from ACTIVITY_TAB
where PROJECT_ID = '161310'
and SUB_PROJECT_ID = 'ACI O&A'
--and SUBSTR(SUB_PROJECT_ID,1,5) = 'ACI O'
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Not used sql developer much but in sqlplus it is: set define off

I believe sql developer has the same or similar options.

There is also an ESCAPE but turning off define is the easiest.
ASKER CERTIFIED SOLUTION
Avatar of Milleniumaire
Milleniumaire
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of finance_teacher

ASKER

Yes, I used an ascii table like the one in your link to identify the decimal value of the ampersand character, so it could be used by the CHR function.