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!

Finding Max value of 2 fields in a Query

Status
Not open for further replies.

Maturi

IS-IT--Management
Oct 9, 2003
81
0
0
GB
Hi,

I have a query (qry_ListEmps) that produces the fields
- Name (text)
- ThisPay (number)
- LastPay (number)


I want a second query (qry_MaxPay) to generate the following:
- Name (as in qry_ListEmps above)
- MaxPay (number - that is the maximum of ThisPay and LastPay)

I need the qry_MaxPay as a Access Query rather than SQL in VB

Can you help please - Thank you

M
 
select IIF(field1 > field2, field1, field2) from table/query...

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top