Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL help
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
![]() |
![]() |