Toad World® Forums

Max Fetch limit cancels script processing

When you have more than one select in a script and you use the Execute Scripts command, the execution stops when any one result set returns more rows that the Fetch Limit.

For example:
Fetch limit set to 1000 rows.

Select colA
from table_with_500_rows;

Select colA
from table_with_1500_rows;

Select colA
from table_with_500_rows;

Select colA
from table_with_500_rows;

Running this with the Execute Scripts button, you will get the results from the first and second select statements (up to 1000 rows), but then execution stops.

This is on version 7.0.3.37 64Bit.

I am also able to reproduce this on Toad/SQL 7.1.0.142 (64 bit). Also, in testing with different scenarios, including changing the FETCH count in the options base, it does appear that no matter how many SELECTS are in the script, execution stops after the first SELECT that brings back more than the FETCH limit.

Changing the fetch count to "Unlimited" in the Options does prevent the issue from happening, but there are good reasons why users want to limit the fetch on initial execution. Our Dev team will surely look at this. Stay tuned.