Solved

SQL

Posted on 2011-09-14
6
227 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
  • 5
6 Comments
 
LVL 51

Expert Comment

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

and run as script
0
 
LVL 51

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 51

Expert Comment

by:HainKurt
ID: 36536505
try

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

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 51

Accepted Solution

by:
HainKurt earned 250 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikipedia.org/wiki/PHP  Very powerful.  But a…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

808 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