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
How do I make tree view child nodes appear upon form load?
Invalid Custom Toolbar message
DFS not replicating certain files
SQL Average from Query
How can I create a macro, to delete all forms and reports in a .adp project (Microsoft Access 2000)?
Hierarchy Tree Query
Dynamically Change File Name Property In File Connection Manager
How secure is the Access 2007 database password?
Inserting XML data int an nText field in SQL 2005
Migration from NT4 PDC to 2003 AD... NT4 SP6 AWOL!