Create nested table.

I am trying to create a table of records (nested table) with these lines,

CREATE OR REPLACE PROCEDURE LDCSCHEMA.SME(instatute IN varchar2, incls IN varchar2, inoff_date IN date) IS
    -- This record is used to create a nested table.
    wics_stat_rec LDCDEVELOPER.wics_stat_stg%ROWTYPE;
    -- Create nested table of above records.
    TYPE stat_t IS TABLE OF wics_stat_rec;
    -- Instantiate table of nested records in memory.
    stat_out stat_t;
   
    BEGIN

Here is the error I get:

PLS-00488: invalid variable declaration:  object 'WICS_STAT_REC' must be a type or subtype

Any ideas, Thank you
CaputoAsked:
Who is Participating?
 
Muhammad Noman IqbalConnect With a Mentor Commented:
Hi,

Try the code attached and see the followin link for some samples

http://www.psoug.org/reference/OLD/nested_tab.html
CREATE OR REPLACE PROCEDURE LDCSCHEMA.SME(instatute IN varchar2, incls IN varchar2, inoff_date IN date) IS
    -- This record is used to create a nested table.
    TYPE wics_stat_rec IS TABLE OF LDCDEVELOPER.wics_stat_stg%ROWTYPE;
    -- Create nested table of above records.
    TYPE stat_t IS TABLE OF wics_stat_rec;
    -- Instantiate table of nested records in memory.
    stat_out stat_t;
   
    BEGIN

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.