Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL help
"Frank van Bortel" <frank.van.bortel_at_gmail.com> a écrit dans le message de news: efh2lq$5kf$2_at_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...
:-D
Regards
Michel Cadot
Received on Thu Sep 28 2006 - 13:28:14 CDT
![]() |
![]() |