Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SQL

Posted on 2011-09-14
6
Medium Priority
?
231 Views
Last Modified: 2012-05-12
HI EXPERTS
select 'iamtechnical & good Morning' from dual

if i execute the above line sql server or toad, a window is popping up for &, to input value.
how to get read of & and : in toad, if it is in a string

0
Comment
Question by:iamtechnical
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
6 Comments
 
LVL 59

Expert Comment

by:HainKurt
ID: 36536349
set scan off;
select 'iamtechnical & good Morning' from dual;

and run as script
0
 
LVL 59

Expert Comment

by:HainKurt
ID: 36536363
in toad options, "execute/Compile" there is an option
"Prompt for substitution variables" uncheck that one and run with F9
0
 

Author Comment

by:iamtechnical
ID: 36536406
@hainkurt

if i run set scan off, i would not be able to call variables when ever necessary

and if i uncheck the box, it will entirely take out the option of SCANNING variables, which i dont want

select 'iamtechnical & good Morning' from dual
where :in_date <= sysdate

in the above line i get two promts
1 for &
1 for :

but i need the : promt not the &

0
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
LVL 59

Expert Comment

by:HainKurt
ID: 36536505
try

set define on;
set esc '\';
select 'iamtechnical \& good Morning' from dual;
0
 
LVL 59

Expert Comment

by:HainKurt
ID: 36536571
or what about this


select 'iamtechnical '|| '&' || ' good Morning' from dual where 1=:x;

it will ask for :x but no other prompt...
0
 
LVL 59

Accepted Solution

by:
HainKurt earned 1000 total points
ID: 36536600
or this

set define ':';
select 'iamtechnical & good Morning' from dual where 1=:x;

it will ask for :x but not &good
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question