GET SINGLE ROW ORDER BY LATEST DATE.

S

Sinner

Hi,


In below query I want to return the DAT.MS by latest date.


SELECT DAT.[Date_Time], DAT.MS, DAT.Activity, DAT.User, DAT.[Business
Partner], DAT.Region, DAT.[Receipt No], DAT.[Payment Amount],
DAT.SCARD_NO, DAT.SI_NO
FROM DAT
WHERE (((DAT.Activity) Like "*REGULAR*") AND ((DAT.SI_NO)<>"NA"));


The field has same value against different dates like:


DATE_TIME MS (REST OF THE FIELDS)
21/08/2008 78
16/08/2008 78
22/08/2008 78
13/08/2008 78


The result that I need is below so that there is no other entry (no
duplicate rows)
22/08/2008 78
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top