You are here: Re: SQL Query Help needed « PHP SQL « IT news, forums, messages
Re: SQL Query Help needed

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация