# PL/SQL script that includes & in text fields

**URL:** <https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [August 23, 2013, 9:11am UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422 "2013-08-23T09:11:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrcooper](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jrcooper](https://forums.toadworld.com/u/jrcooper)\
**Post date:** [August 23, 2013, 9:11am UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/1 "2013-08-23T09:11:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![anand.coimbatore](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@anand.coimbatore](https://forums.toadworld.com/u/anand.coimbatore)\
**Post date:** [August 23, 2013, 9:26am UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/2 "2013-08-23T09:26:36Z")

</div>

Right click in the editor and click on substitution variable prompting

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [August 23, 2013, 9:33am UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/3 "2013-08-23T09:33:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NormTeamT](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/normteamt/32/53_2.png) [@NormTeamT](https://forums.toadworld.com/u/NormTeamT)\
**Post date:** [August 23, 2013, 11:19am UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/4 "2013-08-23T11:19:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![NormTeamT](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/normteamt/32/53_2.png) [@NormTeamT](https://forums.toadworld.com/u/NormTeamT)\
**Post date:** [August 23, 2013, 11:24am UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/5 "2013-08-23T11:24:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jrcooper](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jrcooper](https://forums.toadworld.com/u/jrcooper)\
**Post date:** [August 23, 2013, 12:16pm UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/6 "2013-08-23T12:16:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![GTDG](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/gtdg/32/140_2.png) [@GTDG](https://forums.toadworld.com/u/GTDG)\
**Post date:** [August 23, 2013, 12:24pm UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/7 "2013-08-23T12:24:14Z")

</div>

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](mailto:bounce-jrcooper@toadworld.com)]

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

**To:** [toadoracle@toadworld.com](mailto: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](http://gyk.r.mailjet.com/redirect/4s5lh7c859mxb2c5vk62mb/www.toadworld.com/products/toad-for-oracle/f/10/p/20182/40877.aspx#40877)**

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](http://gyk.r.mailjet.com/redirect/4rm7t6kqfc4g5hp29g7otn/www.toadworld.com/products/toad-for-oracle/f/10/t/20182.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for Oracle - General](http://gyk.r.mailjet.com/redirect/o690th8xmxbqy37vd62nk0/www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.

Toad for Oracle - Discussion Forum

[Flag](http://gyk.r.mailjet.com/redirect/pwqvtn70cjc6xhshnd2k9t/www.toadworld.com/products/toad-for-oracle/f/10/p/20182/40877.aspx?AbuseContentId=3e303db5-1bdc-406d-9076-bef756f87503&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/9cb081df/4yCmCC.gif)

---

<div class="post-metadata">

**Author:** ![Bert\_Scalzo](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/bert_scalzo/32/274_2.png) [@Bert\_Scalzo](https://forums.toadworld.com/u/Bert_Scalzo)\
**Post date:** [August 23, 2013, 12:29pm UTC](https://forums.toadworld.com/t/pl-sql-script-that-includes-in-text-fields/26422/8 "2013-08-23T12:29:14Z")

</div>

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](mailto:bounce-GTDG@toadworld.com)]

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

**To:** [toadoracle@toadworld.com](mailto: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](http://gyk.r.mailjet.com/redirect/x3f9t0f5dlwh0bghkmd3mq/www.toadworld.com/products/toad-for-oracle/f/10/p/20182/40878.aspx#40878)**

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](mailto:bounce-jrcooper@toadworld.com)]

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

**To:** [toadoracle@toadworld.com](mailto: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](http://gyk.r.mailjet.com/redirect/8mmttn0hg2okrhbbo8sm2j/gyk.r.mailjet.com/redirect/4s5lh7c859mxb2c5vk62mb/www.toadworld.com/products/toad-for-oracle/f/10/p/20182/40877.aspx#40877)**

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](http://gyk.r.mailjet.com/redirect/mgbrh7z04cvxyc19m9zf0c/gyk.r.mailjet.com/redirect/4rm7t6kqfc4g5hp29g7otn/www.toadworld.com/products/toad-for-oracle/f/10/t/20182.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for Oracle - General](http://gyk.r.mailjet.com/redirect/ppp4h7h194ks3whmvsd1q1/gyk.r.mailjet.com/redirect/o690th8xmxbqy37vd62nk0/www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.

Toad for Oracle - Discussion Forum

[Flag](http://gyk.r.mailjet.com/redirect/wtmjtvhvgnlfq0mrj7dbvg/gyk.r.mailjet.com/redirect/pwqvtn70cjc6xhshnd2k9t/www.toadworld.com/products/toad-for-oracle/f/10/p/20182/40877.aspx?AbuseContentId=3e303db5-1bdc-406d-9076-bef756f87503&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/9cb081df/4yCmCC.gif)

To reply, please reply-all to this email.

[Stop receiving emails](http://gyk.r.mailjet.com/redirect/1xm4tk5slsnsctk1knr67v/www.toadworld.com/products/toad-for-oracle/f/10/t/20182.aspx?subscribe=false) on this subject.

Or [  
Unsubscribe from Toad for Oracle - General](http://gyk.r.mailjet.com/redirect/jf7bhp80h0lh8otpnwyyr8/www.toadworld.com/products/toad-for-oracle/f/10.aspx?subscribe=false) notifications altogether.

Toad for Oracle - Discussion Forum

[Flag](http://gyk.r.mailjet.com/redirect/hfnjh9kr9rbxl01brrr1br/www.toadworld.com/products/toad-for-oracle/f/10/p/20182/40878.aspx?AbuseContentId=0fa29bd0-2e4c-4366-b6bf-13f858597d81&AbuseContentTypeId=f586769b-0822-468a-b7f3-a94d480ed9b0&AbuseFlag=true)  
this post as spam/abuse.

![](http://gyk.r.mailjet.com/01946b8c/4yCykO.gif)
