Single row subquery error on count of data set

Hi

I have a really simple query

SELECT *

FROM TABLE

WHERE PAID = ‘NA’

AND DELETED IS NULL;

It returns a data set. But when I right click to do “Record Count” I get ORA-01427: single-row subquery returns more than one row. I understand the error, just not how I can get this from a simple count on a set of data that has already been pulled??

Is this me being incredibly stupid? I have restarted TOAD and the same thing occurs. I’m using 12.1 Professional.

Did anyone ever reply to this? I’m having the exact same issue when exporting, but my results return initially with no error.

I guess I missed this original post. He said he was using Toad 12.1 I just tried this in 12.1 and didn’t receive any error. Jonny1, if you’re still having the problem, in the main menu, click Database -> Spool SQL -> Spool to Screen and try it again. Toad will display all of the queries that it is executing. Post it here and we’ll try to track it down. Most likely it’s been fixed in a newer version.

ncooper, if you are trying to export, then you are doing something completely different (even if you get the same error message). Can you provide some steps to reproduce the problem so I can have a better idea of what’s happening? Screen shots are always helpful too. Thanks.

Hi,

I am getting the result of query without any error message. But, when i start exporting it ends up with error message "ORA-01427 single-row subquery returns more than one row" . Fyr, attached the print screen.

Regards

syedraoof, read my reply above about turning on spool SQL. Post the Spool SQL output here and hopefully that will reveal the problem.

Hi John,

Me too facing the same issue, I tried the option of sql spool which you mentioned , but I am able to export only 500 records not more than that. kindly assist if there is any other way.

I really can’t be sure without the spool sql output.

From the main menu: Database -> Spool SQL -> Spool to screen.

Then do whatever causes the error.

Then post the spool SQL output. The spool sql output will show the query that caused the error.