With the help of a user defined type as a return type of function with a type of object

Hi, I created my own data type of table I want to use as data type back to a member function of an object type that I created.

I work in an environment of 10g.

The code I used looks like this:

create or replace
Dim p As Package as

type p_rec is (number of v1);
type p_tab is table of the p_rec;

end p;
/

CREATE or REPLACE TYPE p_ot () AS OBJECT

/ * some statements * /.

NO DEFINITIVE MEMBER FUNCTION p.p_tab RETURN foo

);
/


When I try to compile p_ot I get an error: Error (5.40): PLS-00201: identifier 'P.P_TAB' must be declared.

I don't know the syntax is correct so I must be missing something, amy hepl would be great.

See you soon

You can define types of objects

create type p_rec as object ( v1 number );
create type p_tab as table of p_rec;

They can be used inside the package (p) in your example) as well as defined in the package.
In this case, there will be no problems with create type

CREATE TYPE p_ot AS OBJECT (

/* some declarations*/

NOT FINAL MEMBER FUNCTION foo RETURN p_tab
);

Tags: Database

Similar Questions

  • Querying the user-defined types

    I have a chart in which one of the columns is a user-defined data type:
    SQL> describe my_table
    ...
    USER_DATA    MYTYPE
    The type 'MYTYPE' is a simple object that contains a field: a CLOB called MESSAGE:
    SQL> describe mytype
    Name       Null?    Type
    ------     -----    ----
    MESSAGE          CLOB
    When I do a "select *...» "in this table, the USER_DATA column appears as"MYTYPE (oracle.sql.CLOB@898c2d).

    I know that for CLOB and BLOB fields, Developer SQL let me double click on the value and display the content. But for type like this defined by the user that contains a field, I can't navigate the data members of type. I find myself wanting to do something like a 'select user_data.message from my_table", but this is not a valid syntax. Is there a way to query a given specific member of this type defined by the user with the rest of the columns in the table, I can display the CLOB member instead of a representation of the object? If not, is it possible to configure SQL Developer to allow me to browse the data members of types defined by the user? TOAD has a feature like that but I would only use SQL Developer and it is a table that I work with on a regular basis.

    csimons,

    Try this:

    select  t1.user_data.message
    from    eimgr.aq_rtv_docs_out_table t1
    where   rownum = 1;
    

    See you soon

    Edited by: Frenchwood on September 22, 2009 22:38

  • Question of the user defined Type (UDT)

    Hello

    The attached file is NEITHER sample to call a VB6 vi.

    The following is declared in the declaration section:

    ' Global declarations
    Dim lvapp As LabVIEW.Application
    Dim vi LabVIEW.VirtualInstrument

    When I paste these statement in another project (that I'm working on), I get an error 'undefined user-defined type '.

    Can someone point out to me were in the sample, these type definitions are declared?

    Thank you

    Rafi

    PS the attachment is indeed xxx.rar and not xxx.zip.  I changed the name because .rar has not been accepted.  Please rename .rar

    Thank you

    I forgot to mark references to my project

    Project--> references--> LabView. Type library of xxx

    Thank you

  • List of tables of objects or the user-defined type columns

    Hello

    SQL > select * from v version $;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE Production 11.2.0.2.0
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    I have n number of tables in my db, since I have several
    tables containing "user defined type columns.
    so, how can I get/list db objects that contains the user-defined type columns only.
    Please suggest me on this

    Kind regards
    Faiz

    Dear Sir

    I have n number of tables in my db,from that i have several
    tables which contains"user defined type columns"
    so how could i get/list the db objects which contains user defined type columns only.
    Kindly suggest me on this
    

    Use this

    select
          tab.table_name
        , tab.column_name
        , tab.data_type
    from
        user_tab_columns tab
      , user_types typ
    where
        tab.data_type = typ.type_name
    order by
        tab.table_name
        ;
    

    Best regards

    Mohamed Houri

  • retrieving data from columns of user defined type

    Abstract types, I learned the other day. So I created an abstract type and a table.

    Create the student_ty as an object type
    (name varchar2 (20), number of roll);

    create table result)
    Student student_ty,
    (total);



    I also inserted data. But I'm having some trouble with the rretrieval of data. Suppose I want to choose only the roller and the name of the student as described in the type of studen. So I used the follwing query: -.

    Select result student.name;

    But it's not working. But when I use something like this: -.
    Select r.total, r.student.name in result r;


    This works perfectly. My question is that it is a rule that oracle needed to use an alias, whenever retrieve values for a user defined type data?. Help, please.
    Thanks in advance.

    Yes, you can use an alias when the type of object in a table like this.

    select r.student.name, r.student.roll, r.total
      from result r
    
  • user-defined types

    Hi all

    I have a function that returns a type defined by the user in my sql environment. The type consists of 5 different columns. I pass a ref_id to my function, on the basis of which he does some calculations and returns me the type.

    create or replace type my_type

    (

    number of col1,

    col2 varchar2 (100),

    COL3 varchar2 (10),

    number of COL4,

    number of col5

    )

    create or replace function fun (number in_id) return my_type

    as

    Start

    -code1

    -code2

    Return (my_type)

    end;

    In my sql environment, I have a table which is the following structure

    create table tab1

    (

    number of emeline

    upgvc varchar2 (100),

    number of Ref_ID, - this ref_id when it is passed to the function above will return a populated user-defined type values.

    number of col1,

    col2 varchar2 (100),

    COL3 varchar2 (10),

    number of COL4,

    number of col5

    )

    I have a table tab2, using which i will be filling of the columns of the table tab1, tab2 table structure is as below

    create table tab2

    (

    number of emeline

    upgvc varchar2 (100),

    number of Ref_ID)

    now I have to fill each column in table tab1, tab2 table and my pleasure to feature.

    something like

    Insert into tab1

    Select emeline,

    upgvc,

    Ref_ID,

    Rest of the values must be completed by calling the function using the ref_id and fill in the values. What would be the best way to do it? I have millions of records with it. I tried to use this with the function of REGAL and tried fill lines, but its slow.  All of the suggestions.

    Note: apologies for not sticking scripts and the original code since it will take days

    Thank you

    Rahul

    PetervdZwan wrote:

    Hello

    I agree that you shouldn't calc function for each attribute. But you don't need an extra table for this type.

    See below:

    Not sure what you mean:

    SQL > set serveroutput on
    SQL > select a.deptno,.
    2 a.f.col1 col1,
    a.f.col2 3 col2,
    4 a.f.col3 col3,
    5 a.f.col4 col4,
    6 a.f.col5 col5
    7 of)
    8. Select wagneur, f1 (deptno) f
    scott.dept 9 d
    10          ) a
    11.

    DEPTNO COL1 COL2 COL3 COL4 COL5
    ---------- ---------- ---------- ---------- ---------- ----------
    10         10 A          B                   2          3
    20         20 A          B                   2          3
    30         30 A          B                   2          3
    40         40 A          B                   2          3

    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    SQL >

    As you can see, function runs again 5 times by each line. You need to materialize in line of sight. It can be done using NO_MERGE:

    SQL > select a.deptno,.
    2 a.f.col1 col1,
    a.f.col2 3 col2,
    4 a.f.col3 col3,
    5 a.f.col4 col4,
    6 a.f.col5 col5
    7 of)
    8 select / * + no_merge * /.
    wagneur, f1 (deptno) 9 f
    scott.dept 10 d
    11          ) a
    12.

    DEPTNO COL1 COL2 COL3 COL4 COL5
    ---------- ---------- ---------- ---------- ---------- ----------
    10         10 A          B                   2          3
    20         20 A          B                   2          3
    30         30 A          B                   2          3
    40         40 A          B                   2          3

    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    Call to F1
    SQL >

    However, I have and I know not why, the function is called not 4 but 6 times, using the type of collection (as in my first response) causes function calls only 4 - one per each line.

    SY.

  • Add the column to an existing table-based user-defined type

    Hello guys,.
    I am compiling my function that returns a type defined by the user based on an existing table. Throughout the process of initialization so my query returns an additional column - SCORE (1). Here is my package:

    create or replace
    PACKAGE STAFF_AGENCY_PKG AS

    TYPE TYPE_SEEKER_TABLE IS TABLE OF THE DRAW. SEEKER % ROWTYPE;
    FUNCTION GET_SEEKERS (IN_KEYWORD IN VARCHAR2)
    TYPE_SEEKER_TABLE RETURN PIPELINE;

    END STAFF_AGENCY_PKG;
    -------

    create or replace
    STAFF_AGENCY_PKG PACKAGE BODY
    AS

    FUNCTION GET_SEEKERS (IN_KEYWORD IN VARCHAR2)
    TYPE_SEEKER_TABLE RETURN PIPELINE
    IS
    R_TBL TYPE_SEEKER_TABLE; -to return
    BEGIN
    FOR R IN)
    SELECT Seeker.SEEKER_ID,
    Seeker.FIRSTNAME,
    Seeker.LASTNAME,
    Seeker.NATIONALITY,
    Seeker.ISELIGIBLE,
    Seeker.BIRTHDATE,
    Seeker.ISRECIEVEEMAILS,
    Seeker.HIGHESTDEGREE,
    Seeker.ETHNICITY,
    Seeker.GENDER,
    Seeker.ISDISABILITY,
    Seeker.DISABILITY,
    Seeker.CV,
    Seeker.PASSWORD,
    Seeker.PREFFERED_CITY,
    SEEKER. E-mail
    SEEKER. JOB_PREFERENCES_ID,
    SCORE (1)
    THE APPLICANT Seeker
    WHERE CONTAINS (CV, ' < query >)
    < textquery lang 'grammar' = 'context' = > ' |
    GET_RELATED_CATEGORIES (IN_KEYWORD) |
    ' < / textquery >
    < score datatype = "INTEGER" / >
    (< / query > ', 1) > 0
    )
    LOOP
    PIPE ROW (R); -Error (38,10): PLS-00382: expression is of the wrong type
    END LOOP;
    RETURN;

    END GET_SEEKERS;
    END STAFF_AGENCY_PKG;

    How do I change my user type to be sufficient?

    Oracle version 11.2.0.1.0
    Thanks in advance!

    >
    How do I change my user type to be sufficient?
    >
    You will need to create two new TYPEs. The one who has all the columns of the draw. The REQUESTOR table and the new column SCORE, then a TYPE which is an array of the first type.

    See example 12-22 using a Pipelined Table function for a Transformation in the PL/SQl language reference

    http://docs.Oracle.com/CD/B28359_01/AppDev.111/b28370/tuning.htm#i53120

    Here's the first part

    -- Define the ref cursor types and function
    CREATE OR REPLACE PACKAGE refcur_pkg IS
      TYPE refcur_t IS REF CURSOR RETURN employees%ROWTYPE;
      TYPE outrec_typ IS RECORD (
        var_num    NUMBER(6),
        var_char1  VARCHAR2(30),
        var_char2  VARCHAR2(30));
      TYPE outrecset IS TABLE OF outrec_typ;
     FUNCTION f_trans(p refcur_t)
          RETURN outrecset PIPELINED;
    END refcur_pkg;
    /
    
    CREATE OR REPLACE PACKAGE BODY refcur_pkg IS
      FUNCTION f_trans(p refcur_t)
       RETURN outrecset PIPELINED IS
        out_rec outrec_typ;
        in_rec  p%ROWTYPE;
      BEGIN
    

    Change

      TYPE outrec_typ IS RECORD (
        var_num    NUMBER(6),
        var_char1  VARCHAR2(30),
        var_char2  VARCHAR2(30));
      TYPE outrecset IS TABLE OF outrec_typ;
    

    to include all the columns you need. Unfortunately, you have to manually list all the columns in the draw. The REQUESTOR table. If you think you need this same structure in other places you must create them as SQL types instead of PL/SQL types.

    This example should be enough to show you how to modify your code to do something similar.

  • Problem with the implementation of a user-defined function

    Hello.
    I wonder if you could help create a user function in ODI, which would do exactly the same thing as this one:

    create or replace function Konwersja (psWejscie VARCHAR2) return DATE is
    dDate DATE;
    Start
    dDate: = TO_DATE (psWejscie, ' DD month yyyy ',' NLS_DATE_LANGUAGE = POLISH ');
    RETURN dDate;
    EXCEPTION
    WHILE OTHERS THEN
    RETURNS A NULL VALUE.
    END;

    I tried to put Konwersja (psWejscie VARCHAR2) and Konwersja ($(psWejscie)) in the syntax and the rest in the implementation in Oracle syntax, but when I used it in an interface to load data to a date column (Konwersja (.)) (("" Data_U ")), I got an ORA-00923 exception

    Yes, you can call this function from the DB interface directly. In the interface mapping column say Konwersja () it will work.

  • question of the decidability of oralce user defined rules

    Hello

    Accoring to some posts online (http://weblog.clarkparsia.com/2007/08/27/understanding-swrl-part-2-dl-safety/ http://protege.cim3.net/cgi-bin/wiki.pl?SWRLLanguageFAQ), in general, SWRL is undecidable. However, we can add some restrictions to SWRL to regain the decidability: Variables in DL security rules bind only to those explicitly named in the ontology. Add this restriction is sufficient to establish decidable SWRL rules. So, I wonder how the rules defined by the user Oracle reached the decidability. SWRL does adpot the simliar way? Thank you very much in advance.

    Hong

    Salvation Hong,

    It is a good question. Yes, we have adopted a similar idea. Chaining before engine database Oracle database are the existing resources of RDF known variables in rules of deduction. We will not generate a new RDF resource that does not exist already in the ontologies. This is very important because it ensures that the inference process will be completed in a period of time.

    The foregoing does not apply to the inference (a new 12.1) user-defined well.

    Thank you

    Zhe

  • call a DLL that has the user-defined types

    I am trying to call a function in a DLL that is

    int32 system_config(&recCfg, &pulseCfg, errMsg)
    

    recCfg is a structure consisting of 3 double rooms and 2 integers

    and pulseCfg is a structure consisting of just Boolean

    I don't know how to set the input parameters for this call the library feature.

    LabVIEW sees as

    void system_config(void)
    

    I see the only choice of Numeric, Array, String, waveform, digital waveforms, digital data, ActiveX, Adapt to Type and pointer to Instance data for arg1.  ActiveX seems to be the only one to use?

    NYC says:

    I am trying to call a function in a DLL that is

    int32 system_config(&recCfg, &pulseCfg, errMsg)
    

    recCfg is a structure consisting of 3 double rooms and 2 integers

    and pulseCfg is a structure consisting of just Boolean

    Actually contrary to what Simon says you can do in this case. But your line you are showing is unfortunately very unclear, because he does not understand the real typedef for your clusters. So I have to go by what you write in prose that is... Well... not very detailed.

    The first is simply a cluster in LabVIEW with 3 floats to double precision, followed of 2 integers. You find yourself what bitsize integer, you need, as you do not show the typedef in the cluster. In order to connect to a cluster in a CLN you must configure this setting as to adapt to the Type. But be careful who does not work for clusters containing strings or arrays at all. Tables and chains of LabVIEW are something completely different than what awaits a C DLL. You can configure the parameters of function to be C compatible pointers to arrays and strings and LabVIEW will make sure to do the conversion on every call, but you cannot configure the CLN to convert strings and tables within a cluster.

    The second group is really equivalent to a simple Boolean value passed by reference. As you do not show the actual type of the Boolean value, it is difficult to recommend this type of data to use in LabVIEW. Windows BOOL is a 32-bit integer and C++ bool is usually a 8-bit value which would coincide with the Boolean LabVIEW 8-bit use. You cannot configure a Boolean setting directly in the NLCS, so you can either use an integer of size accordingly or create this cluster with a single LabVIEW boolean anyway (if your bool is a bool C++ and not something else) and do the same as for the previous cluster/structure parameter.

  • Inserting data from the user-defined Type

    Hi all

    I have the following type
    create or replace type answer_obj is object (all_employee_seq integer,questionseq varchar2(10),text_answer varchar2(4000),optionseq varchar2(10));
    
    create or replace type answer_tbl is table of answer_obj;
    I have the procedure (within a package) that pulls in the python papers.
    TYPE answer_tbl_type IS TABLE OF question_answer%ROWTYPE
                                   INDEX BY PLS_INTEGER;
    
    PROCEDURE submit_survey (p_answers IN OUT answer_tbl)
       IS
          l_answers_tbl   answer_tbl_type;
       BEGIN
          FOR i IN p_answers.FIRST .. p_answers.LAST
          LOOP
             l_answers_tbl (i).all_employee_seq := p_answers (i).all_employee_seq;
             l_answers_tbl (i).questionseq := p_answers (i).questionseq;
             l_answers_tbl (i).text_answer := p_answers (i).text_answer;
             l_answers_tbl (i).optionseq := p_answers (i).optionseq;
          END LOOP;
    
    
          FORALL idx IN l_answers_tbl.FIRST .. l_answers_tbl.LAST
             INSERT INTO QUESTION_ANSWER
                  VALUES l_answers_tbl (idx);
       
       END;
    My question is, is it better to insert the data directly from the (record) (records) argument using for LOOP INSERT or the conversion of the argument in an associative array and a FORALL?
    As you can see, it's a FOR LOOP to set the values in the array and then by the FORALL.

    I think the above is even faster because of the first LOOP IS done in memory and real integration is carried out with FORALL.
    I want to get as many opinions.


    See you soon,.
    Joel

    Hello

    Because you created the SQL Types, what just to do this within your procedure?

    INSERT INTO QUESTION_ANSWER (all_employee_seq, questionseq, text_answer, optionseq)
    SELECT all_employee_seq, questionseq, text_answer, optionseq
    FROM TABLE(p_answers);
    
  • With the help of "allow users to dynamically add lines:

    I want to know the opinion of the people, if it is an option, whether or not I have to light

    I know that older versions using this option cause huge performance problems when users began adding lines.

    Is this always the case. Should I understand a different approach? Can't present something to the populations of the user then turn around and take him away.

    Not a fan or the other.

    I have always managed to avoid this feature too - this thing that I really hate on this matter is that if you have multiple environments they will be out of sync, for this reason.

    I found helpful to sometimes have a missing form of suppress, where users can create a block to make one see the line or data allowing to do the suppresed or rows to display.

    Kind regards

    John A. Booth
    http://www.metavero.com

  • Selection in the SQL user-defined Type

    I can't try to fill a SQL can be set from a query type:
    SQL> select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    SQL> create type typ_colVarchar30 is table of varchar2(30)
      2  /
    
    Type created.
    
    SQL> declare
      2     v_colVarchar30 typ_colVarchar30;
      3  begin
      4     select table_name into v_colVarchar30 from user_tables;
      5  end;
      6  /
       select table_name into v_colVarchar30 from user_tables;
              *
    ERROR at line 4:
    ORA-06550: line 4, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected UDT got CHAR
    ORA-06550: line 4, column 4:
    PL/SQL: SQL Statement ignored
    
    
    SQL> drop type typ_colVarchar30;
    
    Type dropped.
    I can't use a collection of PL/SQL. It must be a SQL type.

    Thank you.

    Brian

    Use BULK COLLECT

    declare
        v_colVarchar30 typ_colVarchar30;
    begin
       select table_name bulk collect into v_colVarchar30 from user_tables;
    end;
    
  • Configure the read-access via user-defined privilege level

    Hello everyone,

    I m looking for the best configuration to restrict a user read-only. The restriction must be configured through CLI not GANYMEDE.

    Material: 3750 (probably not interesting for that matter)

    More old IOS: 12.2 (53) SE1

    The user should be allowed to:

    • See the running configuration
    • trigger all sorts of orders-show
    • Ping and traceroute of the device

    The user should not be allowed to:

    • Download/delete/rename files on the flash memory
    • Enter the level 15 (not sure if I can avoid it)
    • all orders despite those level 1 and those specified above

    Can someone help me with this?

    Thanks in advance!

    I have won´t forgotten messages useful rates

    Hi Tobias,.

    You can

    set up multiple levels of privilege on a switch as explained below.

    By default, the Cisco IOS Software has two modes of password security: user EXEC and

    Privileged EXEC. You can configure up to 16 levels of commands for each mode.

    By configuring multiple passwords, you can allow different sets of users to have access to

    specified commands.

    For example, if you want many users to have access to the clear line command, you can

    He attributed a level 2 security and distribute the level 2 password fairly widely. But if you

    want more restricted access to the command configure, you can assign security to level 3

    and distribute the password to a more restricted group of users.

    Definition of the level of privilege for a command

    Beginning in privileged EXEC mode, follow these steps to set the privilege level for a

    control mode:

    Purpose of command

    Step 1

    Configure the terminal

    Enter global configuration mode.

    Step 2

    level privilege mode level control

    Set the level of privilege for a command.

    For mode, enter set for the global configuration mode, exec to EXEC mode, interface

    for the interface configuration mode, or the line for line configuration mode.

    For level, the range is from 0 to 15. Level 1 is normal user EXEC mode privileges.

    Level 15 is the level of access allowed by the enable password.

    For command, enter the command that you want to restrict access.

    Step 3

    activate the password level

    Specify the password to enable for the privilege level.

    . For level, the range is from 0 to 15. Level 1 is normal user EXEC mode privileges.

    Password, specify a string from 1 to 25 alphanumeric characters. The string cannot

    start with a number, is case sensitive and allows spaces but ignores leading spaces. By

    by default, no password is defined.

    Step 4

    end

    Return to privileged mode.

    Step 5

    Show running-config

    or

    Show privilege

    Check your entries.

    The first command shows the level of the password configuration and access. The second command

    Displays the privilege level configuration.

    Step 6

    copy running-config startup-config

    (Optional) Save your entries in the configuration file.

    When you set a command to a privilege level, all commands whose syntax is a subset of this

    control can also be programmed at this level. For example, if you set the show ip traffic command

    level 15 show commands and show ip commands are automatically set to privilege level

    15 unless you set them individually at different levels.

    To return to the privilege by default for a given command, use the no privilege mode level

    control of level global configuration command.

    This example shows how to set the command configures to focus on level 14 and set

    SecretPswd14 as the password users must enter to use 14 level controls:

    Switch (config) # level 14 exec privileges set up

    Switch (config) # enable password 14 SecretPswd14 level

    You can also change the default privilege for every user level.

    Change the level of privilege by default for lines beginning in privileged EXEC mode follow these steps to change the default privilege for a line level: complete order

    Step 1 Configure terminal enter global configuration mode.

    Step 2 line vty select the virtual terminal line to restrict access.

    Step 3 privilege level change the default privilege for the line level.

    For level, the range is from 0 to 15. Level 1 is normal user EXEC mode

    privileges. Level 15 is the level of access allowed by the enable password.

    End of step 4 back in privileged mode.

    Step 5 show running-config or show privilege

    Check your entries. The first command shows the level of the password configuration and access.

    The second command shows the privilege level configuration.

    Step 6 copy running-config startup-config (optional) save your entries in the configuration file.

    Users can replace the privilege level that you set by using the privilege level line configuration command

    you connect to the line and enabling a different privilege level.

    They can lower the privilege level by using the disable command.

    If users know the password to a higher privilege level, they can use this password to enable the higher privilege level. You can specify a privilege for your console line level to restrict the use of the line or high-level.

    To restore the default line privilege level, use the no privilege level line configuration command. Also I send you a document for your reference.

    http://www.Cisco.com/univercd/CC/TD/doc/product/LAN/cat3750/12225see/SCG/swauthen.htm #wp1154063

    HTH

    Concerning

    Reem

  • Create user defined TYPE in sql

    Hi all

    I want to create type as below.

    Student TYPE
    IS
    record
    (
    TABLE of object VARCHAR2 (100),
    TABLE FOR mark1 VARCHAR2 (50).
    TABLE OF mark2 VARCHAR2 (50).
    Brand TABLE 3 VARCHAR2 (100)
    );


    I get the error. Like this
    Error (28.3): PLS-00103: encountered the symbol "TABLE" during awaits one of the following values: pragma < an ID > < a between double quote delimited identifiers of >

    My intention is that,

    For each student, I need to HAV an arrary of topics, mark1, mark2, mark 3...
    I actually cut my requirement of project very simple requirement.
    Here for a reason, I need this structure to be like that. Kindly ignore the idea that the subtype of object, mark1,... etc.

    Kindly help me in this regard.


    Thank you
    Sabarisri. N

    something like

    create type subject_tt
    is table of varchar2(100)
    /
    
    create type mark_tt
    is table of varchar2(50)
    /
    create type student
    as object
    (subjects subject_tt
    ,marks    mark_tt
    )
    /
    

    What I don't understand is, why don't you make a relational good datamodel? Makes life a lot easier...

    Published by: Alex Nuijten on August 19, 2011 11:33

Maybe you are looking for