|
-
Jan 28th, 2011, 03:25 AM
#1
Thread Starter
Fanatic Member
Re: Get the max value of two different data in two different tables
My apology, sorry for my bad english, anyway, here's another set of data:
Table 1
ID | DATE | NAME
2011-0002 | 2011-01-26 | Charles
2004-0001 | 2011-01-03 | Shanovski
2004-0002 | 2011-01-03 | Clayton
2011-0001 | 2011-01-18 | Crislie
Table 2
ID | DATE | NAME
2004-0001 | 2010-01-26 | Shanovski
2008-0002 | 2010-01-26 | Grey
2011-0001 | 2011-01-26 | Crislie
--------------
What Im trying to do is display the records by joining those two tables wherein a record is present on both tables using the Maximum of there dates MAX(DATE). In table 1 a user can appear multiple times but in table 2 user can only appears once. Now if I just going to Inner Join them too many records will be display, but all I need is base on their maximum dates. Hope it give you a hint what im trying to do.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|