Toad World® Forums

Number of records returned by a ref cursor


Apologies if this is a really stupid noob question:

I have a procedure which is returning a ref cursor and I want to use code tester to check the number of rows returned in the cursor. How do I do it?

Thanks in advance



In Test Builder, you should have an outcome for the OUT param that is the SYS_REFCURSOR. Click the … in the Changed By Program and enter in a select statement that mimics the columns that the cursor returns. This is used by QCTO to figure out the number of columns and data types returned by the cursor. Now, set the Operator column to ‘#=’, and set the Expected Results to Integer and the expected number of rows.