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 SkipVought 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
0
0
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...

 
Hmmm

Select column1, column2 from table where column2 > column1

that is quite simple no ... unless I dont understand correctly your question

Vince
 
Select <YourFields> from <TableName> where
Total_Amt > Access_Amt
 
I made the same statement but not of Query Grid Issues
We can form the query in VBA coding itself if necessary
So i gave the query?
 
Hi, guys! (&quot;,)

Well, both of you dawnd3 and rajeesh are correct in that both of your suggestions would yield to the same set of records: &quot;record(s) of those who's Total_amt is greater than the Access_amt&quot;. You can either plug the working query or the SQL equivalent of that query as a record source to a report (or even to a form).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top