Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Error in select statement with "with" keyword inside procedure - forum topic by Migueljbd

$
0
0

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 :)

Forums: 

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>