Dear all,
is it possible to put anchoring declaration inside create type statement? Suppose I want to declare the following type in the schema level:
SQL> create or replace type f_name_list_type is table of employees.first_name%ty
pe;
2 /
Warning: Type created with compilation errors.
SQL> SHO ERR
Errors for TYPE F_NAME_LIST_TYPE:
LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0 PL/SQL: Compilation unit analysis terminated
1/35 PLS-00201: identifier 'EMPLOYEES.FIRST_NAME' must be declared
SQL> desc employees
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPLOYEE_ID NUMBER(6)
FIRST_NAME VARCHAR2(20)
LAST_NAME NOT NULL VARCHAR2(25)
EMAIL NOT NULL VARCHAR2(25)
PHONE_NUMBER VARCHAR2(20)
HIRE_DATE NOT NULL DATE
JOB_ID NOT NULL VARCHAR2(10)
SALARY NUMBER(8,2)
COMMISSION_PCT NUMBER(2,2)
MANAGER_ID NUMBER(6)
DEPARTMENT_ID NUMBER(4)
What's wrong with the code above? The error complains about employees.first_name doesn't exist but, clearly it's showing in the schema.
Regards,
Val