ORA-06548 (Getting this error while executing my code using toad version 9.


This exception occurs because the command was issued by a client that did not fetch the full result set returned by the table function.

For example, the table function returns 1000 rows, but the client (which communicates using ODBC) only fetches 200 at a time. If all the rows are fetched, then there is no issue; however, if only a subset is fetched before another command is executed, the exception gets raised. The issue is not observed with SQL Plus since it always fetches the entire result set; this behavior also explains the observed behavior that seemed to be related to the number of rows returned.

Please find the following query:

select * from table(orphan_trans_pkg.GET_ORPHAN_TRANSACTION_DATA())

If I execute it on SQL plus; no oracle exception is raised and If i execute it using TOAD; i am getting an exception.