Re: Q: something like rownum

From: Ken Denny <ken_at_kendenny.com>
Date: Thu, 17 Apr 2008 10:40:45 -0700 (PDT)
Message-ID: <be1d7bf0-fc46-4549-9c45-6d277c1b3a01@l64g2000hse.googlegroups.com>


I believe something like this will do it.

select r_num, the_date, to_char(dates.the_date,'DY') DAY   from (select rownum r_num, the_date

          from (select the_date from my_table
                  where to_char(dates.the_date,'DY') IN
                     ('MON','TUE','WED','THU','FRI')
                  order by the_date)
        union
        select null r_num, the_date from my_table
          where to_char(dates.the_date,'DY') IN ('SAT','SUN'))
   order by the_date; Received on Thu Apr 17 2008 - 12:40:45 CDT

Original text of this message