I have a table as below:
MyJob| MyKey |MyCode|MyDate| MyTime
----------------------------------
q183b| 0131081a | 24 |100315| 9:37
q183b| 0131081a | 9 |100315| 11:38
q183b| 0132426a | 1 |90314 | 15:36
q183b| 0132426a | 2 |100315| 9:36
q183b| 0132426a | 85 |100315| 11:36
Note that MyDate format will be YYMMDD and MyTime is in 24 hour format.
I want to return the result of unique MyKey with most recent MyDate and MyTime. The expected result will be something like:
MyJob | MyKey |MyCode| MyDate | MyTime
q183b | 0131081a | 9 | 100315 | 11:38
q183b | 0132426a | 85 | 100315 | 11:36
Any help will be much appreciated. Thanks.