Avatar of Zuzan329
Zuzan329
Flag for United States of America asked on

sql variable issue when selecting in ('&')

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.
SQL

Avatar of undefined
Last Comment
Zuzan329

8/22/2022 - Mon
smilitaru

just run this before your statement
set scan off;
smilitaru

or you could use:
Where C.CLTR in ('SS\&%’ ESCAPE ‘\G')
Zuzan329

ASKER
Thank you... tried both neither worked.
Susan
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
keyu

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 &
Zuzan329

ASKER
Sorry that did not work either.... it should give me 16 accounts but it gave me 0
David VanZandt

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.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
keyu

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Zuzan329

ASKER
Thank you this finally worked