Re: Create a view to return multiple rows based on the column values of a single row, How?

From: Yann Cauchard <yann.cauchard_at_spcconsultants.com>
Date: 2000/06/30
Message-ID: <8jhgrk$1lep$1_at_news4.isdnet.net>#1/1


Try something like :

A table XCOUNT with one row XNB filled with 1
2
3
4
5
...

then
SELECT to_number(to_char(date_of_the_day,'DD'))+XNB, date_of_the_day  FROM XCOUNT,Period_View WHERE
  First_Date_Of_Month = '01-feb-2000'
  AND xnb<Number_Of_Days;

Not tested, but the idea is here.

Hope it helps.

adamvt_at_my-deja.com a écrit dans le message <8jgtpl$9t3$1_at_nnrp1.deja.com>...
>OK! SQL Gurus, here is what I have:
>
>- Say I have a table, eg Period, whith two columns, eg
>First_Date_Of_Month (date) and Number_Of_Days (integer). For every
>month there is only on entry in it which are the date of the 1st day of
>the month and the number of days in that month. eg:
>
>First_Date_Of_Month Number_Of_Days
>01-jan-2000 31
>01-feb-2000 29
>01-mar-2000 31
>...
>...
>
>And here is what I would like to get:
>
>- A view, eg Period_View, which will produce me the follwing result
>based on the row in the above table:
>
>SELECT day_of_the_month, date_of_the_day FROM Period_View WHERE
> First_Date_Of_Month = '01-feb-2000';
>
>day_of_the_month date_of_the_day
>01 01-feb-2000
>02 02-feb-2000
>.
>.
>29 29-feb-2000
>
>Is this possible? If so how?
>Thanks for any help!
>Adam.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Fri Jun 30 2000 - 00:00:00 CEST

Original text of this message