|
Posted by Captain Paralytic on 12/12/06 15:53
Just realised that there was a word missing. It should say:
SELECT DISTINCT
xi.DocNo,
xi.InvNo,
IFNULL(x7.VAT,0) VAT7,
IFNULL(x7.Amount,0) Am7,
IFNULL(x22.VAT,0) VAT22,
IFNULL(x22.Amount,0) Am22,
IFNULL(x0.VAT,0) VAT0,
IFNULL(x0.Amount,0) Am0
FROM X xi
LEFT JOIN X x7 ON xi.InvNo = x7.InvNo AND x7.VAT = 7
LEFT JOIN X x22 ON xi.InvNo = x22.InvNo AND x22.VAT = 22
LEFT JOIN X x0 ON xi.InvNo = x0.InvNo AND x0.VAT = 0
Navigation:
[Reply to this message]
|