関数内でカーソルを返す必要があります。
CREATE OR REPLACE FUNCTION test_cursor (
bigstring IN VARCHAR2
)
RETURN cursor
IS
row_test table_colors := table_colors(bigstring);
c1 CURSOR;
BEGIN
OPEN c1 FOR
select * from cars where color IN (select column_value
from table(row_test));
RETURN c1;
END test_cursor;
table_colors
は:
create or replace type table_colors as table of varchar2(20);
しかし、テストすると、同じように渡すblue, red, pink, white
か、'blue', 'red', 'pink', 'white'
常に同じエラーがスローされます
ORA-06502: PL/SQL; numeric or value error: character string buffer too small
この行でrow table_colors := table_colors(bigstring);
ここで何が間違っていますか?