Query to return record set where 1 column is greater than another

photoguy53

photographer
Local time
Today, 04:26
Joined
Sep 24, 2004
Messages
19
Creating a query in Design View, how does one create a query in the "Condition" field that tells the Access to return the record set where the contents of one column is greater than the other?

Table Name=SURVEY_RAW_DATA
Column Name=TOTAL_EXP
Column Name=TOTAL_NX

There are obviously many more columns than those listed above in the table, but these are the two I want to compare. Also the two columns contain numbers.

In SQL I would write it like this:

Select * FROM SURVEY_RAW_DATA
WHERE TOTAL_EXP > TOTAL NX;

Thanks in advance,
Ken
 
Select * FROM SURVEY_RAW_DATA
WHERE TOTAL_EXP > TOTAL_NX;

Write the SQL statement in query SQL View. Then you can switch to query Design View to see how Access has put the statement in the query grid.

^
 
Typically, this is done by writing an expression. (Which, if you follow EMP's advice, would have been revealed to you...)

In the query design grid, Expr1: [Total_Exp] - [Total_Nx] for the field and >0 for the criteria
 

Users who are viewing this thread

Back
Top Bottom