Page 1 of 1

Recordcount error: subquery returned more than 1 value

Posted: Mon 06 May 2013 14:35
by martind1
Using MS SQL Server I am geting the following message:

"Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <=, >, >=or when the subquery is used as an expression."

opening the following query:

Code: Select all

select SRTE_NR, sum(NETTO_GEWICHT) as SUM_GEWICHT
from BHAE
where (AANL_NR=:AANL_NR)
group by SRTE_NR
or any other query containing a 'group by' clause.

used configuration:
FetchAll:=false;
Options.QueryRecCount:=true;

dbMonitor shows this statement querying recordcount:

Code: Select all

SET :PCOUNT = (SELECT COUNT(*)
from BHAE
where (AANL_NR=:AANL_NR)
group by SRTE_NR)
so you can see the incorrect generated statement.

Re: Recordcount error: subquery returned more than 1 value

Posted: Mon 13 May 2013 07:36
by AndreyZ
Thank you for the information. We have reproduced the problem and the investigation of the problem is in progress. We will notify you when we have any results.

Re: Recordcount error: subquery returned more than 1 value

Posted: Fri 07 Jun 2013 17:20
by tobias_cd
Hello Andrey,
are there any news on this issue?
Thank you.

Re: Recordcount error: subquery returned more than 1 value

Posted: Mon 10 Jun 2013 09:28
by AndreyZ
We will fix this problem in one of the nearest UniDAC builds.