Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: get last date query


Message #1 by "Nick" <nikosdra@l...> on Mon, 19 Mar 2001 10:05:00
Can somebody tell me the correct syntax for getting only the latest date's 

records in a recordset??
Message #2 by "Dallas Martin" <dmartin@z...> on Mon, 19 Mar 2001 09:21:05 -0500
select max(date) from table;

 this return the single latest date in your table



if selecting other fields also, then



select fld1, fld2,max(date) from table

group by fld1,fld2



this returns the multiple rows with latest date for these fields (GROUP)

i.e.

abc,124,12/4/2000

def,565,6/2/1999















----- Original Message -----

From: "Nick" <nikosdra@l...>

To: "ASP Databases" <asp_databases@p...>

Sent: Monday, March 19, 2001 10:05 AM

Subject: [asp_databases] get last date query





> Can somebody tell me the correct syntax for getting only the latest date's

> records in a recordset??




  Return to Index