How can I export a view?

In the export dialog, you need to make sure that the “Display all results
in grid” checkbox is unchecked.

In older versions of Toad, it was called “Clone Cursor” and if
that’s the case for you, it needs to be checked.

Thanks, this has me on the right track.

But… if I found the right CLONE GRID on the SAVE AS, it looks like this will be available only after I’ve already run out of memory. I ran a small filter & set the option & it seems OK, and now I am running the full set. It takes 2 hours to see if it blows up, and 6 hours if it does not blow. I tried using code “set clone cursor on” and a few variations, no luck there.

THANK YOU!

Oh, yeah there was a bug a few versions ago where the “export to flat
file” screen didn’t give you a chance to set that.

As a workaround, instead of “export to flat file”, use Save As and
choose the “fixed field spacing” export format. Then you can check
“clone cursor” before any exporting begins. Besides not running out
of memory, it should export much faster that way too.

-John

Oh, and if you are in the editor, and running your query using F5, or otherwise
running as a script – don’t. That’s going to pull all the
rows.

Just type in your sql statement and run it with F9. That will only pull a few
screens full at a time.

I did try & fail with F5. I have 2 million rows, so F9 is not attractive. I just need to export a view to a flat file, but it has been a lot more difficult than I expected.

F5 isn’t ideal due to your row number. F9 IS ideal, did you try that and have issues?


I tried both F5 and F9. Nothing works. I just want to export a view. I need to set some parameter before it runs out of memory. Spooling works except for when I run out of memory. I need to just simply write to a flat file. I do not need a grid.

Then try this

Spool c:\your_file_name here

Select whatever from wherever.

Execute As Script – Via QSR or SQL*Plus.

OR, find your view in the Schema Browser. Right-click > SaveAs/Export Data.
Choose Delimited Text or Fixed Field Spacing…

If you want to export the whole view, go to the Schema Browser, find the view on
the left hand side, right-click the view name, then choose “Export
Dataset” or “Save as” (depending on your Toad version)

If you want to export from a grid, you have to run the statement with F9 when
you have so many rows or you will run out of memory. Just enter the select
statement and F9 – not all the SET commands before it. Then, when you get
the export screen – if you have a ‘clone cursor’ option, it
needs to be checked. If you have a ‘display all results in grid’
option, it needs to be unchecked.

-John
image002.gif (43 Bytes)

If you want to export the whole view, go to the Schema Browser, find the view on
the left hand side, right-click the view name, then choose “Export
Dataset” or “Save as” (depending on your Toad version)

If you want to export from a grid, you have to run the statement with F9 when
you have so many rows or you will run out of memory. Just enter the select
statement and F9 – not all the SET commands before it. Then, when you get
the export screen – if you have a ‘clone cursor’ option, it
needs to be checked. If you have a ‘display all results in grid’
option, it needs to be unchecked.

-John
image004.gif