informix sql
My sql has a temp table with 76 rows in it.
The fields are reference, status, and date.
There can be more than one row for each reference, but with differing dates.
What select syntax is needed to only return the row with the latest date,
dropping all others ?
I thought I knew SQL, but haven't used it for many years.
I would like to create another temp table, for further selects later on.
Many thanks
The fields are reference, status, and date.
There can be more than one row for each reference, but with differing dates.
What select syntax is needed to only return the row with the latest date,
dropping all others ?
I thought I knew SQL, but haven't used it for many years.
I would like to create another temp table, for further selects later on.
Many thanks
0
Comments
If you just want the date:
If you want the latest date and highest reference#
If you want all rows with the latest date (there may be more than 1 row on if date is the same):
If you want 1 row with the latest date (there may be more than 1 row so a sort is applied):
sorry for the delay in getting back to you !