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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date issue in access query

Status
Not open for further replies.

cvaccess

Technical User
Jun 26, 2002
55
US
I have tried to create a query that shows the last date entered in the table. My table is indiv_tp_sub. The fields are SCRUB_DATE,CHILD_TP,CLAIM_SUB. The table has data entered in weekly, usually. So the scrub date would show for example, 7/10/02, 7/15/02,7/17/02,7/18/02. Based on this example, I want to pull the last date (most current, in this case 7/18/02) with the sum of claim_sub for each child_tp.

I can't figure this out. Please help.

Thanks.
cvaccess
 
SELECT SCRUB_DATE,CHILD_TP,CLAIM_SUB
FROM INDIV_TP_SUB
WHERE SCRUB_DATE IN(SELECT MAX(SCRUB_DATE) FROM INDIV_TP_SUB)

This will show SCRUB_DATE, CHILD_TP, AND CLAIM_SUB for each record having the newest SCRUB_DATE.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top