Toad World® Forums

getting error while extracting Data using toad

Hi,

My query looks like below.

select * from table_name

where column_name IN (values)

and trunc(CREATEDATE) > trunc(sysdate) -60

We were able to run this query successfully and extract the data.

But all of sudden the same query we are unable to extract the data into excel sheet with the following error.

‘single-row subquery returns more than one row’

I have tried setting the option database > spool sql > spool sql to file as per one of the forum suggestion but we still getting the same error while extracting the data.

kindly suggest how can we resolve this issue.

I have tried setting the option database > spool sql > spool sql to file as per one of the forum suggestion but we still getting the same error while extracting the data.

Spool to screen is easier than spool to file. We don’t expect that Spool SQL will make you not have the error. It is merely to help diagnose the problem. So, perform the spool sql, and show us the output. Maybe then we can help.

also, is this all of the query?

On Dec 8, 2017 7:03 AM, “satish.d” bounce-satishd@toadworld.com wrote:

getting error while extracting Data using toad

Thread created by satish.d
Hi,

My query looks like below.

select * from table_name

where column_name IN (values)

and trunc(CREATEDATE) > trunc(sysdate) -60

We were able to run this query successfully and extract the data.

But all of sudden the same query we are unable to extract the data into excel sheet with the following error.

‘single-row subquery returns more than one row’

I have tried setting the option database > spool sql > spool sql to file as per one of the forum suggestion but we still getting the same error while extracting the data.

kindly suggest how can we resolve this issue.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle Forum notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.

from table_name
is that “table_name” maybe a view?

IN (values)
is that "values a list or query?
If it iquery then this is the problem.

  1. Please send the whole problematic query.

  2. try the same query in SQL*Plus. Is there an error as well?