I would like to write an SQL statement that returns a list that will return the record which's creation time is the latest out of a few that answer the same criteria.
How do I do that?
I don't exactly understand your question, so it's either:
select max(creationTime) from whatever where criteria = 1
or:
select * from whatever where criteria = 1 order by creationTime desc
The 1st one. How do I ask a record what's its creation time?
you have to add the creation date as a column to the table...
and then you can run:
select top 1 * from tableName where (criteria=1) order by dateCreated desc
Got an answer for scf84? Would you like to comment on the posted answers, or vote for the one which you think is the best?
Sign up for a free account, or sign in (if you're already a member).
Other people asked questions on similar topics, check out the answers they received:
Other people asked questions on various topics, and are still waiting for answer. Would be great if you can take a sec and answer them