Would you please guide me on why I am getting the following error:
ORA-06550: line 1, column 29: PLS-00553: character set name is not recognized ORA-06550: line 0, column 0: PL/SQL: Compilation unit analysis terminatedwhen I try to run the below script:
declare cursor c1 is select distinct Table_name from all_tab_columns where column_name ='ACCOUNT_ID' AND OWNER ='SEAPARK'; TNAME ALL_TAB_COLUMNS.TABLE_NAME%TYPE; nrows number(3) := 0; sQuery varchar2(500) ; BEGIN sQuery := ''; OPEN C1; loop FETCH C1 INTO TNAME; EXIT WHEN c1%NOTFOUND; sQuery := 'Select count(*) from ' || TNAME || ' where Account_id like ''BE%'''; EXECUTE IMMEDIATE sQuery into nrows; -- nrows := Sql%rowcount; dbms_output.put_line ('Table_name :' || tname ||' ' ||'has '|| nrows || ' rows'); end loop; end; /
Thanks in advance.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.