Dear SQL Experts,
DB Version - 11.2.0.4.
The following SQL returns an error. The :BindGroupsList is more than 4000 characters. How can this be converted to a CLOB ? or any other alternate suggetions.
SELECT * FROM TABLE(CAST(sni_gn_in_string_list_test(:BindGroupsList) AS table_of_varchar))
"ORA-01460: unimplemented or unreasonable conversion requested"
function DDL:
CREATE OR REPLACE FUNCTION SNI.SNI_GN_IN_STRING_LIST (p_in_list IN VARCHAR2, p_in_delimiter IN VARCHAR2 DEFAULT ',')
RETURN table_of_varchar
AS
l_tab table_of_varchar := table_of_varchar();
l_text VARCHAR2(32767) := p_in_list || p_in_delimiter;
l_idx NUMBER;
BEGIN
LOOP
l_idx := INSTR(l_text, p_in_delimiter);
EXIT WHEN NVL(l_idx, 0) = 0;
l_tab.extend;
l_tab(l_tab.last) := TRIM(SUBSTR(l_text, 1, l_idx - 1));
l_text := SUBSTR(l_text, l_idx + 1);
END LOOP;
RETURN l_tab;
END;
/
Thanks !