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
unlock the "local area connection' of windows xp
How do I compute a SUM from 2 different tables and divide the Sums?
Set Word 2010 as default for .doc and .docx
Calendar Options grids
BootMGR Is missing
Can we enable the guest account on a machine
Nested countif problem
Insert values in listbox to access table
Need help with SQL 2008 running on a 2008 failover cluster
sharepoint create site column programmatically