yashvant k

yashvant k

  • NA
  • 29
  • 0

Error: At most one record can be returned by this subquery

Jul 22 2010 8:17 AM
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

Answers (1)