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 datestamp which is stored as

> a second field) so that a master list is updated.

> 

> The application is a list of student photos, each database row defines the

> filename of a photo, the student id is assigned to the

> photo once it is known, I then need to produce a list for all photos showing

> the details of the latest photo for each student.

> 

> SELECT  *  FROM Photosforimport ORDER  BY adno, Lastupdatetime DESC

> 

> Gives me the data I need, however I need to be able to just pick out the row

> with the latest Lastupdatetime for each ADNO.

> 

> I couldn`t find anything on google, but may have been asking the wrong

> question!

> 

> Any help greatly appreciated.

> 

> Rob Keeling

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to