fetch from function returning a ref cursor to record

后端 未结 3 625
长发绾君心
长发绾君心 2021-01-19 18:30

I have a function in a package that returns a REF CURSOR to a RECORD. I am trying to call this function from a code block. The calling code looks like this:

         


        
3条回答
  •  清歌不尽
    2021-01-19 18:55

    The pl/sql block to read out the ref cursor looks a bit strange to me. Oracle might not be able to match the type of your cursor c_symbols with the type package_name.record_cursor.

    Suggestion:

    • change the declaration of c_symbols to "c_symbols package_name.record_cursor"
    • replace the statement "open c_symbols" with "c_symbols := package_name.function_name('argument')"

    As long as the called function really does return a cursor, that should work. Else, you might want to post actual source code.

提交回复
热议问题