Toad World® Forums

Export just certain rows?

In TOAD 10.6, I’m looking for an option that allows me to only export certain rows (i.e. the first 50) from the Data Grid. Lil’ help?

Thanks!

  1. Highlight the rows you want (Right click -> Row Select might help)
  2. Right click -> Export Dataset
  3. Choose how you want them exported (Excel, Inserts, etc)
  4. Tick the Export Selected Rows Only checkbox
  5. Click OK

Wow, maybe I should’ve taken the 12 seconds to look for that checkbox

Now, is there a way to stop the query results at say, 50 rows (basically a way to check to see if your results are going to be along the lines of what you expect)?

Thanks for the help!

where rownum
~WRD000.jpeg

where rownum
image001.jpeg

where rownum
image001.jpeg

where rownum
Groetjes,
Wim

2012/1/25 Matt Wilkins

where rownum

~WRD000.jpeg

I wanna play too!

Or where rownum between 1 and 50 . . .

Once you are in the export dialog, Dan, you can change your query by going to
the dataset tab and entering your new criteria there. That would be the only way
to limit the data once you are in that dialog.
~WRD000.jpeg

Well since we’re being silly J

Where rownum in

(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)
~WRD000.jpeg

On 26/01/12 14:58, Bert Scalzo wrote:

Well since we’re being silly J

Where rownum in
(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50)

In which case, I can go even sillier and lees effient as well:

where mod(rownum) in (1,2, … 51)

Might as well read the whole table eh? :wink:


Cheers,
Norm. [TeamT]

On 26/01/12 15:10, Norman Dunbar wrote:

In which case, I can go even sillier and lees effient as well:

where mod(rownum) in (1,2, … 51)

Might as well read the whole table eh? :wink:

Might as well hang up my developer tools now then, the above will simply
not work. I’m a fool! :frowning:

Hangs head in shame.


Cheers,
Norm. [TeamT]

At least you thought of automating it. I’m constantly surprised by developers who are perfectly happy repeating the same actions manually without even thinking once about automating their process. :slight_smile:

Yes, the silliness is rampant. Can I assume the answer to the OP’s original question is that TOAD has no utility for extracting a portion of a result set after the query has been run? You can only control that by limiting the return in your SQL.

The only kluge I can come up with is you let the query spool its initial 500 rows, start the extract, then cancel it. You will get more than 50 rows, but much fewer than the total result.

Best regards,
Mike
Michael S. Zarzycki, MTS | IT Engineering, Integrations, and Programming Manager | Sensata Technologies, Inc. | voice: 508-236-1015 | fax: 508-236-3701 | www.sensata.com | The World Depends on Sensors and Controls

But you can limit the number of returned rows by setting the OCI buffer array
size as well…as long as you’re using F9 (run as statement).

I thought the multi-select of rows and then choosing only export the highlighted
rows was exactly the answer – does that not fit the bill ???

That won’t limit the number of rows returned, it will just decrease the
number of rows returned per fetch.

I knew that! What I meant was, set it so low that the first fetch has the number
of rows you want without having to scroll. Then just work with those rows.
However, I can’t get it to return fewer than 60 at a time.
image001.jpeg

I knew that! What I meant was, set it so low that the first fetch has the number
of rows you want without having to scroll. Then just work with those rows.
However, I can’t get it to return fewer than 60 at a time.
image001.jpeg

Bert, I missed that response. Mea culpa!

Best regards,
Mike

Michael S. Zarzycki, MTS | IT Engineering, Integrations, and Programming Manager
| Sensata Technologies, Inc. | voice: 508-236-1015 | fax: 508-236-3701 |
www.sensata.com | The World Depends on Sensors and Controls

Right. I just wanted to make sure people understand that even if they decrease
this setting they will still have to multiselect the desired rows to export, and
then choose to export only selected rows.