By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Query On Record

P: n/a

I have 2 table; one for keep the Person Info;tblPerson, another one is date
for visit; tblVisit.

tblPerson : PersonID, PersonName, DOB,....

tblVisit: PersonID, Date,......

How do I create a query to find the last visit date for each person? Dmax
couldn't work?

Thanks in adv. for help.

Dec 2 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
select personId, max(visitDate) as lastVisit from tblVisit group by
personId

bplim88 wrote:
I have 2 table; one for keep the Person Info;tblPerson, another one is date
for visit; tblVisit.

tblPerson : PersonID, PersonName, DOB,....

tblVisit: PersonID, Date,......

How do I create a query to find the last visit date for each person? Dmax
couldn't work?

Thanks in adv. for help.
Dec 2 '06 #2

P: n/a
OK.

TQ.

<le*********@natpro.comwrote in message
news:11**********************@16g2000cwy.googlegro ups.com...
select personId, max(visitDate) as lastVisit from tblVisit group by
personId

bplim88 wrote:
>I have 2 table; one for keep the Person Info;tblPerson, another one is
date
for visit; tblVisit.

tblPerson : PersonID, PersonName, DOB,....

tblVisit: PersonID, Date,......

How do I create a query to find the last visit date for each person? Dmax
couldn't work?

Thanks in adv. for help.

Dec 3 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.