Recordcount error: subquery returned more than 1 value
Posted: Mon 06 May 2013 14:35
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:
or any other query containing a 'group by' clause.
used configuration:
FetchAll:=false;
Options.QueryRecCount:=true;
dbMonitor shows this statement querying recordcount:
so you can see the incorrect generated statement.
"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_NRused 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)