Solved

SQL

Posted on 2011-09-14
6
225 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
Comment Utility
set scan off;
select 'iamtechnical & good Morning' from dual;

and run as script
0
 
LVL 51

Expert Comment

by:HainKurt
Comment Utility
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
Comment Utility
@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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 51

Expert Comment

by:HainKurt
Comment Utility
try

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

Expert Comment

by:HainKurt
Comment Utility
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
Comment Utility
or this

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

it will ask for :x but not &good
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Loading csv or delimited data files to MySQL database is a very common task frequently questioned about and almost every time LOAD DATA INFILE comes to the rescue. Here we will try to understand some of the very common scenarios for loading data …
Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

763 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now