Hi All,
I want to fetch the BalanceAmt of a particular Customer attended by a particular attender. The criteria is that a customer may buy more than one items. Each bought items has been recorded individually. At some cases 'attender' value would be NULL.
Here's my query:
SELECT Customer, AttendedBy, SUM(BalanceAmt) FROM billing GROUP BY Customer
HAVING AttendedBy='attender' AND Customer='CustomerName'
My problem is I'm getting the value summed up not attended by the 'attender' (i.e., including NULL value). Help me to do it..
Thanx in advance..