I want to query the query as below but the question is wrong but describes my intentions. select name, date time, data from record, date time = maximum (date time) Update: OK The description of the query intentions is not very good. My bad I want to select the latest record for each person. i like Mickey's answer and quosnoye (and upyoyed miki), but if your needs are similar to me , You should keep in mind some limitations. First and foremost, this works only when you are looking for the latest record or latest record for the same name. If you want the latest record for each person in a set (a record for each person but the latest record for each), then the above solutions are small. Second, and less importantly, if you work with a large dataset, then it can be slow for a long time. So, what's around the work? Whatever I do is to add a small field to mark the "latest" in the table. Then, when I store a record (which is done in the stored procedu...
Comments
Post a Comment