Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL help

Re: PL/SQL help

From: Frank van Bortel <frank.van.bortel_at_gmail.com>
Date: Thu, 28 Sep 2006 20:07:21 +0200
Message-ID: <efh2lq$5kf$2@news6.zwoll1.ov.home.nl>


Michel Cadot schreef:
> SQL> select * from t2;
> NOM NO_CASES
> ---------- ----------
> Smith 2
> John 3
> Mary 2
> Kate 1
>
> 4 rows selected.
>
> SQL> with
> 2 rn as (
> 3 select rownum rn from dual
> 4 connect by level <= (select max(no_cases) from t2)
> 5 )
> 6 select nom
> 7 from t2, rn
> 8 where rn <= no_cases
> 9 order by nom
> 10 /

As always - a beauty! But the OP mentioned PL/SQL in the header... OP: add begin as line 0, and end; as last line. Then enter a slash ('/').

-- 
Regards,
Frank van Bortel

Top-posting is one way to shut me up...
Received on Thu Sep 28 2006 - 13:07:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US