Menu

Query for the latest date

2024-05-21
2024-05-22
  • Abdullah Noman

    Abdullah Noman - 2024-05-21

    Is there a way I can do a query in OQL where I can find the objects with the latest date?
    For example, I have a Ticket class which also records the date when it is submitted. How can I find the ticket which was the latest submitted? What will be the OQL query. Since there is no LIMIT or ORDER BY in OQL , how can I accomplish this?
    I did try this but looks like the MAX function doesn't work in OQL

    SELECT Ticket WHERE MAX(DAY(submit_date))​​​

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2024-05-22

    As far as I know, it's not possible to do this.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.