# Exporting data from oracle to a seperate file

**URL:** <https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [February 17, 2010, 2:34am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258 "2010-02-17T02:34:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [February 17, 2010, 2:34am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/1 "2010-02-17T02:34:02Z")

</div>



---

<div class="post-metadata">

**Author:** ![HillbillyToad](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hillbillytoad/32/190_2.png) [@HillbillyToad](https://forums.toadworld.com/u/HillbillyToad)\
**Post date:** [February 17, 2010, 7:18am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/2 "2010-02-17T07:18:47Z")

</div>

Yes, run your query, click in the result set, mouse-right-click -\> Save As

Choose your file format

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [February 17, 2010, 7:49am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/3 "2010-02-17T07:49:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![HillbillyToad](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hillbillytoad/32/190_2.png) [@HillbillyToad](https://forums.toadworld.com/u/HillbillyToad)\
**Post date:** [February 17, 2010, 7:49am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/4 "2010-02-17T07:49:39Z")

</div>

Ok

Type spool C:\My\_data.txt

Query1;

Query2;

Query3;

…

QueryN;

Then hit F5.

Voila, no mouse.

Toad 10.8 will have voice activated commands, just like your iPhone. Until  
then, the mouse can be a handy instrument.

In 9.7, you can also program a keyboard shortcut for SaveAs, as it’s tied  
to the ‘Grid’ menu. You’ll have to hit F2 first to switch  
focus to the grid, but there’s another no-mouse solution.

---

<div class="post-metadata">

**Author:** ![fidelis](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/fidelis/32/36_2.png) [@fidelis](https://forums.toadworld.com/u/fidelis)\
**Post date:** [February 17, 2010, 7:49am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/5 "2010-02-17T07:49:39Z")

</div>

but i don want to use any mouse or anythin…!

would b running multiple queries whereby results must get saved as csv or psv or any other plain text file.

---

<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:** [February 17, 2010, 8:12am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/6 "2010-02-17T08:12:59Z")

</div>

> > but i don want to use any mouse or anythin......!
> > 
> > would b running multiple queries whereby results must get  
> > saved as csv or psv or any other plain text file.

I think you need the command line option to run a query and dump the  
output? If so, look in Toad's help for "command line" and the topics  
there should explain all.

Good luck.

Cheers,  
Norm. [TeamT]

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at [www.environment-agency.gov.uk](http://www.environment-agency.gov.uk)

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.  
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at [www.environment-agency.gov.uk](http://www.environment-agency.gov.uk)

---

<div class="post-metadata">

**Author:** ![Anonymous1](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Anonymous1](https://forums.toadworld.com/u/Anonymous1)\
**Post date:** [February 17, 2010, 8:26am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/7 "2010-02-17T08:26:12Z")

</div>

Unfortunately this will only save one file and not one per query.

At first I thought that request was pointless. But then I remembered way back  
when Toad had a command called EDIT which inserted a ROWID so you could edit in  
the grid.

Instead of typing SELECT rowid, a, b, c FROM d you said EDIT a, b, c from d .  
This still exists but you have to type it all on one line because of the way the  
MOE works.

So I think a similar possibility could to have a SPOOLSELECT Toad command. You  
would type SPOOLSELECT (filename.ext) a, b, c FROM d and it would run the  
SELECT, look at the extension and produce an appropriate TXT or XLS or whatever  
file using the existing EXPORT DATASET code.

You might even go further and have several parameters:

SPOOLSELECT (filename.ext, [[grid,nogrid,newsession] ] )

Where GRID, noGRID or newsession indicate if you want to see it in a grid, if it  
should just spool (nogrid) or if you want it to spawn a new connection and run  
so you can continue.  
 ![image001.jpeg](https://global.discourse-cdn.com/quest/original/1X/e8288ef7bf69daaab6959f752b25ca292478b911.jpeg)

---

<div class="post-metadata">

**Author:** ![HillbillyToad](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/hillbillytoad/32/190_2.png) [@HillbillyToad](https://forums.toadworld.com/u/HillbillyToad)\
**Post date:** [February 17, 2010, 10:59am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/8 "2010-02-17T10:59:23Z")

</div>

He never said he needed multiple files J

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forums.toadworld.com/u/Guest)\
**Post date:** [February 21, 2010, 6:55am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/9 "2010-02-21T06:55:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![fidelis](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/fidelis/32/36_2.png) [@fidelis](https://forums.toadworld.com/u/fidelis)\
**Post date:** [February 21, 2010, 6:55am UTC](https://forums.toadworld.com/t/exporting-data-from-oracle-to-a-seperate-file/9258/10 "2010-02-21T06:55:39Z")

</div>

Thanks a lot…!  
sorry for delayed reply…am workin more on tht…lets c…!

Will ask for more help as and when need…!
