Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Re: Q: somethin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 5 Topic 6841 of 7279
Post > Topic >>

Re: Q: something like rownum

by Ken Denny <ken@[EMAIL PROTECTED] > Apr 17, 2008 at 10:40 AM

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;
 




 5 Posts in Topic:
Q: something like rownum
yf110@[EMAIL PROTECTED]   2008-04-17 10:26:39 
Re: Q: something like rownum
Ken Denny <ken@[EMAIL   2008-04-17 10:40:45 
Re: Q: something like rownum
Maxim Demenko <mdemenk  2008-04-17 20:24:44 
Re: Q: something like rownum
Charles Hooper <hooper  2008-04-17 12:04:23 
Re: Q: something like rownum
yf110@[EMAIL PROTECTED]   2008-04-17 12:16:34 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 20:53:24 CST 2008.