Dear All,
I got a query as below.The problem is that even there is no data in that date range it generates one single null value row. The moment I remove the this line SUM(tblDepositFullRefund.amount) the problem is solved. Any solution to this?
SELECT CAST(CONCAT('DR',CONCAT(tblDepositFullRefund.depositFullRefundID)) AS CHAR) AS receiptID,
SUM(tblDepositFullRefund.amount)
FROM tblDepositFullRefund
WHERE tblDepositFullRefund.depositFullRefundDate BETWEEN
'2011-12-20' AND '2011-12-21' AND tblDepositFullRefund.outletID=4 AND tblDepositFullRefund.amount>0 ORDER BY tblDepositFullRefund.depositFullRefundDate