the identifier 'DMBS_OUTPUT.CHARARR' must be declared plsql oracle

Asked

Viewed 43 times

0

I am writing the following plsql code:

declare 
  tab      dmbs_output.chararr;
  qtlines  number             default 3;
  res      varchar2(100)      default null;
begin
  dbms_output.get_lines(tab, qtlines);
  dbms_output.put_line(
                       'Retornou: '||qtlines||' registros.');
  for i in 1..qtlines loop
    res := res||' '||tab(i);
  end loop;
  dbms_output.put_line('Pergunta: '||res);
  
end;

When running using plsql Developer it returns me the following error:

ERRO na linha 2:
ORA-06550: linha 2, coluna 12:
PLS-00201: o identificador 'DMBS_OUTPUT.CHARARR' deve ser declarado
ORA-06550: linha 2, coluna 12:
PL/SQL: Item ignored
ORA-06550: linha 6, coluna 25:
PLS-00320: a declaração do tipo desta expressão está incompleta ou incorreta
ORA-06550: linha 6, coluna 3:
PL/SQL: Statement ignored
ORA-06550: linha 10, coluna 22:
PLS-00320: a declaração do tipo desta expressão está incompleta ou incorreta
ORA-06550: linha 10, coluna 5:
PL/SQL: Statement ignored

I am following the example of the book and everything is in agreement! I thank anyone who can help me.

1 answer

0


"I am following the example of the book and everything is in agreement" if you are still have an error in this book and should report it.

There is no dmbs_output the correct is dbms_output, there is a typo ai, see the documentation here: https://docs.oracle.com/database/121/TTPLP/d_output.htm

Change that and it will work, which, by the way, is correct in the rest of your code. In time, do not forget to validate if the output is turned on or nothing will appear in the output, to turn on use SET SERVEROUTPUT ON

Browser other questions tagged

You are not signed in. Login or sign up in order to post.