Toad World® Forums

PL/SQL script that includes & in text fields


#1

I’m sure this has been covered before, but my search hasn’t turned up anything… I’m using TOAD 12.0.01.2 to execute a large PL/SQL script. Some of the insert statements have text fields that include the & character. Of course, as TOAD is executing the script, when it encounters one of these records it stops and asks for the substitution for the & character. I know there is a way to turn off this behavior, and I think I used to know how to do this in previous versions of TOAD… but I can’t find the setting in the options that accomplishes this. Any help would be appreciated… Thanks.


#2

Right click in the editor and click on substitution variable prompting


#3

or put “set define off” at the top of your script.


#4

Alternatively, put set define off at the top of the script and use F5 to execute it.

Same option as SQL*Plus.

Cheers,
Norm. [TeamT]

Sent from my HTC


#5

Sorry John, I didn’t see your reply before I replied myself. The joys of email on a small screen phone!

Cheers,
Norm. [TeamT]

Sent from my HTC


#6

Thanks for the replies. Putting the “Set define off” line in the PL/SQL script resolved the issue. I would have thought that setting the substitution variable prompting to “none” would also have resolved this, but it did not. Indeed, I had gone into the Execute/Compile section of the TOAD options and made “None” the default setting, and I was careful to re-start TOAD to make sure the setting was active, but again this did not change the behavior.


#7

If you’re executing as a script, we obey the same commands that SQL*Plus does so in that case, you need to use SET DEFINE OFF to execute using F5.

From: jrcooper [mailto:bounce-jrcooper@toadworld.com]

Sent: Friday, August 23, 2013 3:17 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] PL/SQL script that includes & in text fields

RE: PL/SQL script that includes & in text fields

Reply by jrcooper

Thanks for the replies. Putting the “Set define off” line in the PL/SQL script resolved the issue. I would have thought that setting the substitution variable prompting to “none” would also
have resolved this, but it did not. Indeed, I had gone into the Execute/Compile section of the TOAD options and made “None” the default setting, and I was careful to re-start TOAD to make sure the setting was active, but again this did not change the behavior.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#8

Plus you can add that line to your glogin.sql file (see toad options – works same way as sql plus) and then you never have to remember to do it

From: Gregory Liss [mailto:bounce-GTDG@toadworld.com]

Sent: Friday, August 23, 2013 2:25 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] PL/SQL script that includes & in text fields

RE: PL/SQL script that includes & in text fields

Reply by Gregory Liss

If you’re executing as a script, we obey the same commands that SQL*Plus does so in that case, you need to use SET DEFINE OFF to execute using F5.

From: jrcooper [mailto:bounce-jrcooper@toadworld.com]

Sent: Friday, August 23, 2013 3:17 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] PL/SQL script that includes & in text fields

RE:
PL/SQL script that includes & in text fields

Reply by jrcooper

Thanks for the replies. Putting the “Set define off” line in the PL/SQL script resolved the issue. I would have thought that setting the substitution variable prompting to “none” would also
have resolved this, but it did not. Indeed, I had gone into the Execute/Compile section of the TOAD options and made “None” the default setting, and I was careful to re-start TOAD to make sure the setting was active, but again this did not change the behavior.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.