Make a casewhen statement including an alias in the same query
Thu, 25 Feb 2016 - 3:58 PM
Im working on a storage db and want to make a query that informs if an item is low in stock. I have made this i MS Access but have problems here in Base as I just started with this.
In Access I did this in design mode
In Stock:[Total in] – [Total out]
Low in Stock:IIF
While in Base
“Total in” – “Total out”
Alias: In Stock
But when Im trying to make the casewhen statement it cant find the “In stock” alias field.
When I make a query based on that query then the alias becomes the valid fieldname and the casewhen works, but I dont want to have multible querys just becouse it needs multible steps. In Access it worked fine to have all those steps in a single query, so how do I make it in Base?
I also had trouble when I tried the >= function. > worked fine but not >=
/Cabid
?
R