Komma getrennte Werte zu IN-Funktion in Oracle
Ich versuche, die folgende Abfrage auszuführen, erhalte jedoch kein Ergebnis.
ann jemand sagen, was ich falsch mach
DECLARE
object_types VARCHAR2(200);
v_object_types VARCHAR2(200);
l_count number;
BEGIN
object_types :='TABLE,VIEW';
select ''''||regexp_replace(object_types, '( )*(,)( )*',''',''')||''''
into v_object_types from dual;
dbms_output.put_line(to_char(v_object_types));
SELECT count(*) into l_count
FROM all_objects o where o.object_type IN ('||v_object_types||');
dbms_output.put_line(l_count);
END;