Microsoft
Software
Hardware
Network
Question : Doing Some math in a Select
I want to see if the qty on hand(QOH) is half of the FullPalletQty(FPQ)
so if item xyz has 20 on hand (QOH) and the item master shows full pallet qty (FPQ)=48
it would be .T.
since 20-48=28 (this is < half(48))
I want my select (if this is the best place to do it?) to....
SELECT item, qoh, fpq,
FROM MyTable ;
WHERE ((qoh-fpq) < (fpq/2));
into cursor cReults readwrite
Answer : Doing Some math in a Select
It is much simpler:
SELECT item, qoh, fpq ;
FROM MyTable ;
WHERE qoh >= fpq/2 ;
into cursor cReults readwrite
SELECT item, qoh, fpq, ROUND(qoh/fpq, 0) AS Percentage ;
FROM MyTable ;
WHERE qoh >= fpq/2 ;
into cursor cReults readwrite
BTW, 20-48= -28
Random Solutions
Why wont a hp laptop power up?
CSocket send and receive
How do I keep a running sum on a form in Access 2003?
SBS 2008/Exchange 2007 - offsite website hosting by 1 and 1
Excel graph in access not updating
Disable Software installtions through Group Policy?
All memory used by SQL Server 2008 + Reporting Services
how to unlock my touch 3g phone, if i forgot my username and password
Is there a way to install IIS using Configuration Manager 2007?
Cannot Resolve Loopback 5.3.5 Delivery Error