sql variable issue when selecting  in ('&')

Zuzan329
Zuzan329 used Ask the Experts™
on
Hello I am useind Toad for oracle and can not get past this variable pop up when selecting specific  files with '&' in them.
example:
Where C.CLTR in ('SS&G')
Can anyone help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
just run this before your statement
set scan off;
or you could use:
Where C.CLTR in ('SS\&%’ ESCAPE ‘\G')

Author

Commented:
Thank you... tried both neither worked.
Susan
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Commented:
try by this

Where C.CLTR in ('SSamp;G')


Html encoding of & is amp;

when it goes to heml it will automatically decode it as &

Author

Commented:
Sorry that did not work either.... it should give me 16 accounts but it gave me 0
David VanZandtOracle Database Administrator III

Commented:
There's probably some setting for this, but I've little success in having my SET commands recognized in TOAD.  I would ask, therefore, that you go into an old-fashioned SQL*Plus session, devoid of any GUI layering, and try your statement with smilitaru's answer.  If that doesn't work as advertised, reply and post your statement here.
Commented:
in your database you must have stored it in & formate right so it will definatly give you 0 filter

try to retrieve it this way

Where replace(C.CLTR,'&','amp;') in ('SSamp;G')

Author

Commented:
Thank you this finally worked

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial