# Automate pl/sql Output ?

**URL:** <https://forums.toadworld.com/t/automate-pl-sql-output/5920>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [November 6, 2008, 2:09am UTC](https://forums.toadworld.com/t/automate-pl-sql-output/5920 "2008-11-06T02:09:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![benruming](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@benruming](https://forums.toadworld.com/u/benruming)\
**Post date:** [November 6, 2008, 2:09am UTC](https://forums.toadworld.com/t/automate-pl-sql-output/5920/1 "2008-11-06T02:09:49Z")

</div>

Hi,

My company is considering using Toad for Data Analysis for its automation capabilities.

Is it possible to write an Oracle anonymous PL/SQL block that performs a query + logic and then outputs the result set to be captured in the file and email functions of the Toad product ?

i.e. instead of a SQL statement, I need to execute PL/SQL

Thanks,  
Ben

---

<div class="post-metadata">

**Author:** ![Henrik\_Johnson](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/henrik_johnson/32/14_2.png) [@Henrik\_Johnson](https://forums.toadworld.com/u/Henrik_Johnson)\
**Post date:** [November 6, 2008, 2:36am UTC](https://forums.toadworld.com/t/automate-pl-sql-output/5920/2 "2008-11-06T02:36:10Z")

</div>

Yes, this is possible. However I do not think DBMS\_OUTPUT will be captured. Any query results or script output will still be captured though.

/Mauritz

---

<div class="post-metadata">

**Author:** ![benruming](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@benruming](https://forums.toadworld.com/u/benruming)\
**Post date:** [November 6, 2008, 6:53am UTC](https://forums.toadworld.com/t/automate-pl-sql-output/5920/3 "2008-11-06T06:53:22Z")

</div>

Hi Mauritz,

Do you have an example of what type of query results get picked up by the toad for data analysis report object ?

I’m familiar with PL/SQL but none of my examples seem to propogate to an actualt report that I can email.

Many thanks,

Ben

---

<div class="post-metadata">

**Author:** ![Henrik\_Johnson](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/henrik_johnson/32/14_2.png) [@Henrik\_Johnson](https://forums.toadworld.com/u/Henrik_Johnson)\
**Post date:** [November 6, 2008, 11:50am UTC](https://forums.toadworld.com/t/automate-pl-sql-output/5920/4 "2008-11-06T11:50:10Z")

</div>

Basically the action you want to use is “Select to editor with result”. This generates a TEF (Toad Editor File) which you can then attach to the email and finally open in Toad and you will see the result in the editor as if you had executed the script in the Toad editor directly. There unfortunately is no way to get the script result in text directly. This could be a future enhancement though for the 4.5 release because I can definitely see the need.

/Mauritz

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [November 6, 2008, 8:38pm UTC](https://forums.toadworld.com/t/automate-pl-sql-output/5920/5 "2008-11-06T20:38:06Z")

</div>

Interesting request. I have entered CR 55,774 to look into this.

Debbie
