Hi Team,
Below is the code, I have written to store the column values into a collection using a select statement. I am getting the below error, kindly help me in this regard. Any help is really appreciated.
CREATE TYPE enames_var IS VARRAY(200) OF VARCHAR2(30);
declare
l_empdata enames_var;
begin
select first_name into l_empdata
from employees;
end;
/
Error:
ORA-06550: line 4, column 8:
PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got CHAR
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:
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.