I have two queries that return the same data, only the calculating field with the case is moved. I am using the Access Client Solutions "run query" to execute the query.
If I run this one
Select storenum, businessdate, kitchensenttime, parkcartime as delivertime, (parkcartime-kitchensenttime) as deliveryseconds, case when parkcartime-kitchensenttime>360 then 1 else 0 end as disastrouscount from irislib.tblorder where not(kitchensenttime='01/01/0001' or parkcartime='01/01/0001') and parkcartime>kitchensenttime and businessdate='05/18/2022' No rows are returned.
While this one
Select storenum, businessdate, kitchensenttime, case when parkcartime-kitchensenttime>360 then 1 else 0 end as disastrouscount, parkcartime as delivertime, (parkcartime-kitchensenttime) as deliveryseconds from irislib.tblorder where not(kitchensenttime='01/01/0001' or parkcartime='01/01/0001') and parkcartime>kitchensenttime and businessdate='05/18/2022' Will return rows. If I try the "broken" query with just the storenum and businessdate with just the disastrouscount calculation will it return rows.


