Invalid Identifier error for scope
<p>I have created <code>customer_ty</code> object which includes a nested table called "deposits".</p>

<pre><code>CREATE TYPE deposit_ty as object(
depNo number,
depCategory ref depcategory_ty,
amount number,
period number
)
/
</code></pre>

<p>This 'depCategory' reference depcategory_ty in another table called 'depcategory_tbl'.</p>

<pre><code>CREATE TYPE deposit_ntty as table of depcategory_ty
/

CREATE TYPE address_ty as varray(3) of varchar2(20)
/

CREATE TYPE customer_ty as object(
custId varchar2(4),
custName varchar2(10),
address address_ty,
dob date,
deposits deposit_ntty
)
/

CREATE TABLE customer_tbl of customer_ty(
custId primary key)
nested table deposits store as cli_deposit_tbl
/

alter table cli_deposit_tbl
add scope for (depCategory) is depcategory_tbl
/
</code></pre>

<p>The problem appears when I try to add a scope for table. it says; </p>

<pre><code>add scope for (depCategory) is depcategory_tbl
               *
ERROR at line 2:
ORA-0094:"DEPCATEGORY":Inavalid Identifier
</code></pre>

<p>All the identifiers are correct. What is wrong with this?</p>