huge returned number problems
Date: Tue, 15 Jan 2008 07:06:31 -0800 (PST)
Message-ID: <9b42c15a-c7f3-480b-b833-a435d2cfe0bd@y5g2000hsf.googlegroups.com>
hi all, i want to Show total purchases by supplier in 2006.
and i want to nclude only those suppliers from whom we made purchases
of more than 2,000,000 during the first 6 months of 2006.
so i did the following:
select purpmt.suppl_code as "Supplier",
sum(purch.qty * purch.unit_price) "Total Purchases"
from purch, purpmt , purinv
having to_char(purinv.inv_date,'mm') < '07'
and to_char(purinv.inv_date,'yy') = '06'
and (purch.qty * purch.unit_price) > 2000000
and purinv.suppl_code = purpmt.suppl_code
group by purpmt.suppl_code
order by purpmt.suppl_code
but this is giving me huge number with +E12 and things imaginary, is there any wrong logic in my query or what would the problem be
help appreciated Received on Tue Jan 15 2008 - 09:06:31 CST