var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Using Derived Column in Where Condition
I am making queries using VBA in Access.
I have one query temp3 that returns several records with columns ID, Diff etc.
I would like to filter the results of temp3 further using the condition temp3.[Diff] <> 0
I could not use this condition within temp3 because Diff is a derived column.
So I making another query temp4 as below:
SELECT * FROM temp3
WHERE temp3.[Diff] <> 0;
When I run this Query, the records filter correctly. However, the Diff column is blank for all records.
What am I doing wrong here?
I also tried nesting temp 3 as below and get the same issue:
select * from( Query temp3) as data where data.diff <> 0
Can you please help me with this?
If the original query (temp3) computes [Diff] such as:
Originally Posted by anunat
You can filter the resulting data set in the same query using:
SELECT..., <Column2> - <Column1> AS Diff
WHERE ((<Column2> - <Column1>) <> 0)
Have a nice day!