Create view with inline function in db<>fiddle
carriann last edited by
I'm trying to create a view with in inline function in db<>fiddle.
I've removed the CREATE VIEW part for now, and am just trying to run the query, just to get to the root issue.
select /*+ WITH_PLSQL */ calc from ( with function calculator (m number, r number) return number is begin return m * r; end calculator; select calculator(3, 2) as calc from dual ); /
When I run that code in https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=1a73f5bfb341d2b29468423be18a9b49 , I get an error:
ORA-00905: missing keyword
What am I doing wrong?
What went wrong
- That feature didn't exist in 11.2
- You used the question SQL, not the answer SQL
My answer is the same. Define it in the outer most
with function calculator (m number, r number) return number is begin return m * r; end calculator; select calculator(3, 2) as calc from dual