hi,
Can anyone tell why i am getting this error, At most one record can be returned by this subquery.
My query is,
"SELECT Count(*) AS TotalComp,(SELECT Count(*) FROM DE INNER JOIN CmpMaster ON DE.DE_Id = CmpMaster.DE_Id WHERE CmpMaster.Order='Yes' OR IsRegistered='True' AND DEO.District LIKE '" + dist + "%' GROUP BY DE.District ) AS TOTALORDER FROM DE INNER JOIN CmpMaster ON DE.DE_Id = SchCmpMaster.DE_Id WHERE (((DE.District) Like '" + dist + "%'))GROUP BY DE.District "
i am looping this qurey for different district, for first dist it work fine and on 2nd onward it throws the error.
please provide some alternate for this.
Regards,
yash
Loading
Hirendra SisodiyaPosted Jul 23, 2010, 7:28 AM
your problem is very common..check that subquery should return atleast one record....
thanks