How to send inline table as parameter to function that receives a table?
Replace:
with original_tbl as ( select SOME_VARCHAR from table(returning_tbl()) where SOME_VARCHAR = 'SOME_VALUE'),outside_tbl as ( select * from table(receiving_tbl( original_tbl )))select * from outside_tbl
With:
with original_tbl as ( select SOME_VARCHAR from table(returning_tbl()) where SOME_VARCHAR = 'SOME_VALUE'),outside_tbl as ( select * from table(receiving_tbl( (select cast(collect(SOME_OBJ(SOME_VARCHAR)) as SOME_TBL) from original_tbl) )))select * from outside_tbl
I'd like to add some simple explanation of what's happening here. But this example is so complicated I'm not sure if there's any easy lesson to learn here.