Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

with function in sql does not run on livesql

RanagalFeb 5 2020 — edited Feb 6 2020

Hello experts,

I don't understand this problem on livesql. The following code is not running. What am I missing ?

with function f_val(i_p in number)

return varchar2

is

begin

return to\_char(to\_date(i\_p,'J'),'Jsp');

end;

select f_val(level) as val from dual connect by level <= 10;

The above is perfectly fine and runs without any error on Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production.

But the same is erroring out like below on livesql (which is Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production). Any idea why ?

pastedImage_0.png

Regards,

Ranagal

This post has been answered by AndrewSayer on Feb 6 2020
Jump to Answer
Comments
Post Details
Added on Feb 5 2020
5 comments
406 views