Re: select record for last column value [message #374206] |
Wed, 30 May 2001 10:23 |
sverch
Messages: 582 Registered: December 2000
|
Senior Member |
|
|
I don't know details of your table, but you can do
something like this:
SELECT ItemCode, ItemValue FROM your_table
WHERE to_char(YEAR,'YY') IN (SELECT TO_CHAR(MAX(YEAR),'YY')FROM
your_table WHERE to_char(year,'YY') NOT IN (SELECT TO_CHAR(MAX
(year),'YY') FROM your table);
I did not run it, but I hope it will work.
NOT IN is going to be slow, but you can replace it with NOT (.......)
|
|
|