declare
cursor c1 is select username from dba_users where username not in ('A', 'B', 'C') order by username;
users VARCHAR2(32000);
sel VARCHAR2(32000);
begin
for c_users in c1
loop
users := users||' '||c_users.username;
EXECUTE IMMEDIATE 'select count(),owner, object_type from dba_objects@dblinkk where owner ='||'c_users.username'|| 'group by owner, object_type
MINUS select count(),owner, object_type from dba_objects where owner ='||'c_users.username'|| 'group by owner, object_type' INTO sel;
end loop;
users := SUBSTR(users, 2, LENGTH(users));
dbms_output.put_line('users:'||users);
end;
/
Wyświetla się error
ERROR at line 1:
ORA-00936: missing expression
ORA-06512: at line 12
ORA-00933:command not properly ended
ORA-06512: at line 12