Re: sql query to return unique ids from a table of date stamped results

2004-11-06 Thread Gleb Paharenko
Hi. May be it will be helpful: http://dev.mysql.com/doc/mysql/en/TIMESTAMP_4.1.html Rob Keeling [EMAIL PROTECTED] wrote: I am trying to find the sql statement needed to extract, from a table of data with multiple instances of a id no, a list of unique id nos, picking the latest (by

Re: sql query to return unique ids from a table of date stamped results

2004-11-06 Thread Michael Stassen
For each ADNO, you want the row with Lastupdatetime equal to that group's MAX(Lastupdatetime) . This is a little bit tricky and a frequently asked question. There are 3 ways to do it documented in the manual http://dev.mysql.com/doc/mysql/en/example-Maximum-column-group-row.html. Michael Rob

Re: sql query to return unique ids from a table of date stamped results

2004-11-06 Thread Michael Stassen
How will that help? He already has a timestamp column. He's asking how to get the rows conataining the groupwise maximum timestamps. Michael Gleb Paharenko wrote: Hi. May be it will be helpful: http://dev.mysql.com/doc/mysql/en/TIMESTAMP_4.1.html Rob Keeling [EMAIL PROTECTED] wrote: I am

sql query to return unique ids from a table of date stamped results

2004-11-05 Thread Rob Keeling
I am trying to find the sql statement needed to extract, from a table of data with multiple instances of a id no, a list of unique id nos, picking the latest (by datestamp which is stored as a second field) so that a master list is updated. The application is a list of student photos, each