Hi Team,
I have written the below code to store the data returned from a select into nested table in PLSQL. When I run the code, I am getting the error mentioned below. Any help is really appreciated.
create or replace type tr_empdata is object
(
empid number(10),
ename varchar2(80)
);
create or replace type nt_emp is table of tr_empdata;
declare
l_empdata nt_emp;
begin
Select employee_id , concat(first_name||' ',last_name) ename into l_empdata
from employees;
end;
/
Error:
Error starting at line 8 in command:
declare
l_empdata nt_emp;
begin
Select employee_id , concat(first_name||' ',last_name) ename into l_empdata
from employees;
end;
Error report:
ORA-06550: line 4, column 77:
PL/SQL: ORA-00947: not enough values
ORA-06550: line 4, column 1:
PL/SQL: SQL Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: