2019 Feb 21 2:19 PM
I am trying to write a query where I can find out what items are in stock, after deducting the committed quantities.
This works:
SELECT TOP 10 T1.[ItemCode], ( T1.[OnHand] - T1.[IsCommited] ) as [AVAILABLE] FROM [OITM] T1 ORDER BY [AVAILABLE]
But if I try to add [AVAILABLE] to the where clause:
SELECT TOP 10 T1.[ItemCode], ( T1.[OnHand] - T1.[IsCommited] ) as [AVAILABLE] FROM [OITM] T1 WHERE [AVAILABLE] > '0'
it gives the error "Invalid Column Name." I have tried this several different ways, all without success.
Any help would be appreciated.
Thanks,
Seth
2019 Feb 21 3:52 PM
2019 Feb 21 3:52 PM
2019 Feb 22 1:20 PM
2019 Feb 25 8:55 AM