All Forums Database
Migueljbd 3 posts Joined 04/13
08 Apr 2013
Error in select statement with "with" keyword inside procedure

replace procedure myprocess(in p_date date)

 

Begin

 

insert into my_table(field_1,field_2)

 

with tmp_tab(field1,field2,field3) as

 

(select field1,field2,field3

 

    From my_table2)

 

select field1,field2

 

from tmp_tab;

 

end;

 
Hello everyone
i have a problem in a select statement, when I used a "with" keyword, I have the statement above
I create a procedure without problems but when I execute the procedure the database return this message:
"call failed. [3707] myprocess: syntax error, expected something like a name or a Unicode delimited identifiers or a 'SELECT' keyword or '(' between '(' and 'WITH' keyword."
I hope someone can help me resolve this error.
regards :)

dnoeth 4628 posts Joined 11/04
08 Apr 2013

What realese are you running?
A few releases ago WITH was not allowed n SPs.
Dieter

Dieter

You must sign in to leave a comment.