Re: Max two dates

2001-08-07 Thread Bunyamin K. Karadeniz
THANK YOU SO MUCH . BUNYAMIN - Original Message - To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED] Sent: Monday, August 06, 2001 7:21 PM Is this what you are looking for: select activity_date from (select activity_date from sbc order by activity_date desc) where

Max two dates

2001-08-06 Thread Bunyamin K. Karadeniz
I have a date field and I want to select rows with max 2 date values. How can I do that? Thank you.

RE: Max two dates

2001-08-06 Thread Bala, Prakash
Is this what you are looking for: select activity_date from (select activity_date from sbc order by activity_date desc) where rownum 3 -Original Message- Sent: Monday, August 06, 2001 11:52 AM To: Multiple recipients of list ORACLE-L I have a date field and I want to select rows

RE: Max two dates

2001-08-06 Thread Yadav, Shailesh
Bunyamin, You could use the Top-N SQL technique if you are using Oracle 8i. Try SELECT * FROM (SELECT * FROM yourtable ORDER BY datefield DESC) WHERE ROWNUM = 2 HTH Shailesh -Original Message- Sent: Monday, August 06, 2001 11:52 AM To: Multiple recipients of list

RE: Max two dates

2001-08-06 Thread Kevin Lange
Remember that the Order by in the imbeded table in the from is not valid on 8.0.5 (and probably before). At least it does not work for me. -Original Message- Sent: Monday, August 06, 2001 11:21 AM To: Multiple recipients of list ORACLE-L Is this what you are looking for: select