PL/SQL (MOSC)

MOSC Banner

Table function - ORA-00932: inconsistent datatypes: expected - got -

edited Jun 29, 2020 10:06AM in PL/SQL (MOSC) 3 commentsAnswered

Hi All,

I'm trying to return a result set of query by using table function.

The procedure I have written gets a parameter of SQL query and returns a table that contains the result set.

I have a problem when fetching the value of cursor into the table type.

The code is:

create type t_rowset_test as table of clob;

-----------------------------------------

create or replace function get_table_rows_test (f_query IN CLOB) return t_rowset_test AS

  l_rowset  t_rowset_test;

  ref_cursor_row SYS_REFCURSOR;

BEGIN

  l_rowset := t_rowset_test();

  OPEN ref_cursor_row FOR f_query;

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center