?
Solved

Create nested table.

Posted on 2009-04-17
1
Medium Priority
?
566 Views
Last Modified: 2013-12-07
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
0
Comment
Question by:Caputo
1 Comment
 
LVL 4

Accepted Solution

by:
Muhammad Noman Iqbal earned 2000 total points
ID: 24174142
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

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Salesforce.com is a cloud-based customer relationship management (CRM) system. In this article, you will learn how to add and map custom lead and contact fields to your Salesforce instance.
Read about achieving the basic levels of HRIS security in the workplace.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question