sql variable issue when selecting  in ('&')

Zuzan329 used Ask the Experts™
Hello I am useind Toad for oracle and can not get past this variable pop up when selecting specific  files with '&' in them.
Where C.CLTR in ('SS&G')
Can anyone help.
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')


Thank you... tried both neither worked.
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.

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 &


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

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.
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')


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