Toad World® Forums

Error in Proc Editor if the code contains Recursive subquery with 'with'


#1

Hi.

Attempt to to create stored procedure with (new in ORacle 10g) recursive subquery factoring ends with Toad error on Syntax Check (TOAD 10.0.1).

Below is the sample code, which is valid and compilable, but TOAD code editor displays the error (see attached pic).

Thanks in advance for coming suggestions,

Pawel


create or replace procedure tst_pawel

as

ln_number NUMBER;

begin

with s (s,n,scbp) as (

select 1,1,'1' scbp from dual



union all



select s,n+1,scbp||'/'||to_char(n+1) from s

where n < 18

)

select count(1) into ln_number from s;

end;

pic1.bmp