0

I have an Oracle procedure that executes select statement and returns the result.

I need to use that result in another select statement. Is it possible to do this?

This does not work:

SELECT * FROM myprocedure(parameter);
zygimantus
  • 3,649
  • 4
  • 39
  • 54
  • 1
    [Why is selecting from stored procedure not supported in relational databases](http://stackoverflow.com/a/33833353/5070879) – Lukasz Szozda Apr 12 '16 at 08:31
  • 1
    A procedure doesn't *return* anything, do you really have a function, and if so what does it return - a (pipelined) collection, a ref cursor, something else? Or is it a procedure with an our parameter? – Alex Poole Apr 12 '16 at 08:34
  • In addition, check this to see how to do it : [Creating a function to return a table](http://stackoverflow.com/questions/2829880/create-an-oracle-function-that-returns-a-table) – Mihai-Daniel Virna Apr 12 '16 at 08:39
  • Yes, it is an our parameter, so called SYS_REFCURSOR. – zygimantus Apr 12 '16 at 08:57

0 Answers0