Re: how to generate the output w/o using temp table

Hi Grace

Have you tried this?

select startdate outdate
        , id
from <table>
union all
select enddate  outdate
         ,id
from <table>
order by 1

HTH

Kind regards

Kresimir Fabijanic


mglim2@xxxxxxxxxxxx wrote:

>Hi, 
>
>I got a table w/ the ff: data 
>
>id   startdate   enddate
>1   10/01/2004  12/13/2004
>2   12/01/2004  12/02/2005
>3   12/03/2004  02/20/2005 
>
>
>need to produce the ff:output 
>
>mm/yyy            id
>11/2004            1
>12/2004            1
>12/2004            2
>12/2004            3
>01/2005            3
>02/2005            3 
>
>how can i  produce this result w/o using a temporary table in my select 
>stmt? 
>
> 
>
>Best Regards,
>Grace Lim
>Suy Sing Comm'l Corp 
>
>----------------------------------------------------------------
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>----------------------------------------------------------------
>To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
>put 'unsubscribe' in the subject line.
>--
>Archives are at http://www.freelists.org/archives/oracle-l/
>FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
>-----------------------------------------------------------------
>
>  
>

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: