I have been trying to update some rows of a column in a database using the following statement but its not working
UPDATE member_payment AS p
SET debtor_receipt = (SELECT Sum(d.amount)
FROM debtor_receipt d,
customer c,
dairy_member m,
member_payment p,
vendor v
WHERE m.member_id = c.member
AND d.customer = c.customer_id
AND p.payee = v.vendor_id
AND v.member = m.member_id
AND d.txn_date = '2013-04-30')
WHERE p.payee IN(SELECT vendor_id
FROM vendor v,
debtor_receipt d,
customer c,
dairy_member m,
member_payment p
WHERE v.member = m.member_id
AND m.member_id = c.member
AND d.customer = c.customer_id
AND d.txn_date = '2013-04-30')
AND p.txn_date = '2013-05-08'