Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query expression where one field is greater than another

Status
Not open for further replies.

1starr

Programmer
Feb 19, 2002
34
US
I have two fields in my query , lets call one Access_amt and the other Total_amt, where I only want the query to print out the record of those who's Total_amt is greater than the Access_amt. I have tried a lot of combinations such as creating a subquery with in the query, but nothing seems to work. Do anyone have any I ideas.
Thanks...
 
One way would be to create a preliminary query with a calculated field Tot-amt and test this for > 0. You might be able to use this as the direct input for your report.
 
Can't you just say

SELECT Total_amt, Access_amt
FROM YourTableName
WHERE Total_Amt > Access_amt;

or am I missing the point of your question?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top