PL/SQL object type table

Hello

Please tell me how to test code below.
Here's the complete code: -.

------------------------------------------
CREATE type dept_typ AS OBJECT (deptno number, dname varchar2 (20), varchar2 (20)) loc

CREATE TYPE dept_tab AS TABLE OF dept_typ;
----------------------------------------------

create or replace function fun_test
return dept_tab
IS
list dept_tab: = dept_tab();
number of j: = 0;
cursor dept_cur IS
Select deptno, dname, loc scott.dept;
BEGIN
BECAUSE me in dept_cur
LOOP
list. EXTEND (1);
(J) list: = dept_typ (i.deptno, i.dname, i.loc);
j: = j + 1;
END LOOP;
back list;
END;

Thank you
Kamel
SQL> create type name as object
   (fname varchar2 (20), lname varchar2 (20));
/
Type created.

SQL> create type address as object
   (person name, city varchar2 (10));
/
Type created.

SQL> create or replace function addr_fun (p_name name, p_city varchar2)
   return address
is
begin
   return address (name ('ABC', 'EFG'), 'XYZ');
end addr_fun;
/
Function created.

SQL> select addr_fun (null, null) addr_fun from dual
/
ADDR_FUN
--------------------------------------------------
((ABC; EFG); XYZ)
1 row selected.

Tags: Database

Similar Questions

  • Members of Access in SQL object type

    Hello

    I am trying to access members of a type of object in Oracle 9.2.0.8.0 like this:
    SQL> CREATE OR REPLACE TYPE xy_type AS OBJECT(x NUMBER(10,0), y NUMBER(10,0));
      2  /
    
    Type created.
    
    SQL> SELECT xy_type(3, 7) AS xy FROM DUAL;
    
    XY(X, Y)
    ------------------------------
    XY_TYPE(3, 7)
    
    1 row selected.
    
    SQL> SELECT xy FROM (SELECT xy_type(3, 7) AS xy FROM DUAL);
    
    XY(X, Y)
    ------------------------------
    XY_TYPE(3, 7)
    
    1 row selected.
    
    SQL> SELECT xy.x + xy.y FROM (SELECT xy_type(3, 7) AS xy FROM DUAL);
    SELECT xy.x + xy.y FROM (SELECT xy_type(3, 7) AS xy FROM DUAL)
                  *
    ERROR at line 1:
    ORA-00904: "XY"."Y": invalid identifier
    What's not here?

    URS

    You must alias 'table '.

    SQL> select t.xy.x
      2       , t.xy.y
      3    from (SELECT xy_type(3, 7) AS xy FROM DUAL) t
      4  /
    
          XY.X       XY.Y
    ---------- ----------
             3          7
    

    and your example:

    SQL> select t.xy.x + t.xy.y
      2    from (SELECT xy_type(3, 7) AS xy FROM DUAL) t
      3  /
    
    T.XY.X+T.XY.Y
    -------------
               10
    

    Published by: Alex Nuijten on July 7th, 2009 13:18

  • How to fill the value in the nested table by using the object type


    Hi gurus

    I created an object type and able to fill the values in it, now I want to create a nested table type of this object and fill it but looks like I'm doing something wrong, see my code below.

    Code example

    CREATE or REPLACE TYPE countries_o
    AS
    OBJECT
    (
    COUNTRY_ID TANK (2 BYTES),
    COUNTRY_NAME VARCHAR2 (40 BYTE),
    REGION_ID NUMBER);
    /

    create or replace type countries_t is table of the countries_o;

    /

    CREATE OR REPLACE

    ABC of the PROCEDURE

    IS

    v_print countries_t; -: = arr_countries_t('01','Aus',1);

    BEGIN

    v_print: = countries_t('01','A',11);

    DBMS_OUTPUT. Put_line (v_print. COUNTRY_ID | v_print. COUNTRY_NAME | v_print. REGION_ID);

    END;

    /

    Error

    • Error (6.3): PL/SQL: statement ignored
    • Error (6,12): PLS-00306: wrong number or types of arguments in the call to 'COUNTRIES_T '.
    • Error (7.3): PL/SQL: statement ignored
    • Error (7.32): PLS-00302: component 'COUNTRY_ID' must be declared

    Thanks in advance

    Concerning

    Muzz

    Hi user,

    Here is another method that you can try-

    CREATE OR REPLACE

    ABC of the PROCEDURE

    IS

    v_print countries_t: = countries_t (countries_o('01','A',11));

    BEGIN

    DBMS_OUTPUT. Put_line (v_print (1).) COUNTRY_ID | v_print (1). COUNTRY_NAME | v_print (1). REGION_ID); -you're accessinf the first element of the nested table, which in turn points to the object.

    END;

    In the sections of the declaration you have assigned values to the nested table.

    Kind regards
    Maxou

  • access to the external table of object type

    It is a continuation of ORA-06564: XXX_DAT_DIR object does not exist I'm hoping a different subject line will attract different people who may be able to help me solve the situation

    The bottom line is that I can't access my external table of in my object.

    Assume that the user is XYZZY. We run a simple nice don't shop here - no roles, just different schemas.

    When I connect to sqlplus to run Access simple external table that works, I connect as XYZZY. ( it works )

    When I connect my type code compile, I connect as XYZZY. ( so far, so good )

    When I connect to run the stored procedure that uses the object type, I connect as XYZZY. ( does not work.  get ORA-06564: there is no error object XXX_DAT_DIR )

    As mentioned above, I've recently logged and re-run all grants to the user XYZZY.

    When I ran the small test which included the role set to none (after replaying all grants), I logged as user XYZZY, and even though this user has grants, the test has failed. ( , it was a test based on an idea that the problem was that the subsidies have been an role, not the user.  Apparently not the problem ).

    Moira

    Published by: user7532421 on July 20, 2010 13:25

    Hello

    I tried the same scenario and it works fine for me (not at all an exception and the data is loaded into the target at the end table).
    I created all the objects (directory, types of objects, outdoor table heaps under the same user):

    Here's what I did:

    -- Under system
    GRANT CREATE ANY DIRECTORY TO hr
    /
    
    --under HR:
    
    CREATE OR REPLACE DIRECTORY
    XXX_DAT_DIR AS 'H:\Temp';
    /
    
    CREATE TABLE X_TABLE_XO
    (
      L1  VARCHAR2(3 BYTE),
      C1  VARCHAR2(3 BYTE),
      C2  VARCHAR2(3 BYTE)
    )
    ORGANIZATION EXTERNAL
      (  TYPE ORACLE_LOADER
         DEFAULT DIRECTORY XXX_DAT_DIR
         ACCESS PARAMETERS
           ( RECORDS DELIMITED BY NEWLINE
           NOBADFILE
           NODISCARDFILE
           NOLOGFILE
           SKIP 0
           FIELDS TERMINATED BY ';'
           MISSING FIELD VALUES ARE NULL
           REJECT ROWS WITH ALL NULL FIELDS
           (
             L1 Char,
             C1 Char,
             C2 Char
           )  )
         LOCATION (XXX_DAT_DIR:'test_ext_Table.txt')
      )
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    /
    

    Here is an excerpt of my file:

    L1;v1;v2
    L2;v3;v4
    L3;v5;v5
    L4;v6;v6
    

    then:

    
    CREATE TABLE my_table AS SELECT * FROM x_table_xo WHERE ROWNUM<=0
    /
    select column_name,data_type,data_length from user_tab_columns where table_name='MY_TABLE'
    
    COLUMN_NAME,DATA_TYPE,DATA_LENGTH
    L1,VARCHAR2,3
    C1,VARCHAR2,3
    C2,VARCHAR2,3
    

    then (still in HR)

    CREATE OR REPLACE TYPE subloader UNDER dataloader (
       CONSTRUCTOR FUNCTION subloader (
          SELF          IN OUT NOCOPY   subloader,
          record_date                   DATE
       )
          RETURN SELF AS RESULT,
       OVERRIDING MEMBER FUNCTION load_data
          RETURN NUMBER
    )
    ;
    /
    
    CREATE OR REPLACE TYPE BODY subloader
    AS
       CONSTRUCTOR FUNCTION subloader (
          SELF          IN OUT NOCOPY   subloader,
          record_date                   DATE
       )
          RETURN SELF AS RESULT
       IS
       BEGIN
          --    SELF.name := name;
           --   SELF.area := 0;
          RETURN;
       END;
       OVERRIDING MEMBER FUNCTION load_data
          RETURN NUMBER
       IS
          n   NUMBER;
       BEGIN
          INSERT INTO my_table
             (SELECT *
                FROM x_table_xo);
    
          n := SQL%ROWCOUNT;
          COMMIT;
          RETURN n;
       END;
    END;
    /
    

    (no error). then

    set serveroutput on size 5000;
    
    DECLARE
       sl   subloader;
       n number;
    BEGIN
       sl:= subloader(sysdate);
       n:=sl.load_data;
       dbms_output.put_line('n:'||n);
    END;
    /
    

    -It works...

    select * from my_table
    /
    L1,C1,C2
    L1,v1,v2
    L2,v3,v4
    L3,v5,v5
    L4,v6,v6
    

    What is curious, it's that all directories are owned by SYS, even if you create with HR! (select * from all_directories)->, I tried both (System and HR, but the table is owned by HR) not-> no problem. in both situations.

  • Reading of several objects of type table returned

    Hi gurus,
    I have a procedure that is called by a Java code.
    There are 2 (type VARCHAR) input parameters and output parameters 3 viz TWO objects of type Table and a cursor type.
    As out parameters are objects, not simple variables, I'm not able to test this procedure in Oracle SQL developer, please help me to do so.

    Concerning
    Villepreux

    Published by: Villepreux on February 4, 2010 14:47

    Create an anonymous block like this and run.

    declare
      OutParameter1 ;
      OutParameter2 ;
      OutParameter3 ;
    begin
      procedure_name(InParameter1, InParameter2, OutParameter1, OutParameter2, OutParameter3);
    end;
    
  • Houston-25009: failed to create an object of type: java.sql.Timestamp type: java.lang.String

    System.out.println ("New Record");

    BindingContext exDup13 = BindingContext.getCurrent ();

    System.out.println ("kjjk45345323245");

    DCBindingContainer dbDup13 = (DCBindingContainer) exDup13.getCurrentBindingsEntry ();

    System.out.println ("kjjk45345345");

    DCIteratorBinding iterDup13 = dbDup13.findIteratorBinding("XYZIterator");

    System.out.println ("kjjk45345345");

    ViewObject voDup13 = iterDup13.getViewObject ();

    System.out.println("bipin:"+voDup13);

    voDup13.setWhereClause ("ID_NO ='" + idNoBnd.getValue () m:System.NET.SocketAddress.ToString () + "'");

    System.out.println("bipin1:");

    voDup13.executeQuery ();

    System.out.println ("bipin2:");

    voDup13.next ();

    System.out.println("kjjre:"+voDup13.GetRowCount());)

    When I am trying to run this code, I get error at last line.

    Error is:

    Houston-25009: failed to create an object of type: java.sql.Timestamp type: java.lang.String with value: 890089

    You can try using getEstimatedRowCount() instead of getRowCount() as:

    System.out.println ("16:"+voDup13.getEstimatedRowCount());

    If you still get error try to getEstimatedRowCount() before defining where clause and see if the error will come up again or not

  • Collections of SQL / objects - how to store a table within a column?

    Hi guys,.

    I have a current table on production... I'm only allow you to add a column to her...

    The simplified scenario is...

    I have a table

    CREATE TABLE PLAN_TRANSACTION
    (THE ARGUMENT PLAN_ID VARCHAR2 (20) DEFAULT SYS_GUID();)
    PLAN_NUMBERS_TYPE COLUMN? );

    For the PLAN_NUMBERS column, I want to store all types and numbers associated with the PLAN_ID.


    In general, it would be

    CREATE TABLE TYPES_AND_NUMBERS
    (TYPE VARCHAR2 (20),)
    NUMBER OF NUMBERS);
    ---------------------------------
    Type A, 12345
    Type B, 12345
    Type A, 54211

    etc.

    Now instead of add another additional column PLAN_ID TYPES_AND_NUMBERS table and create a relationship of foreign key with PLAN_TRANSACTION.
    I want to keep the table inside the table PLAN_TRANSACTION column.


    I think doing this


    CREATE TYPE TYPES_AND_NUMBERS AS OBJECT
    (TYPE VARCHAR2 (20),)
    NUMBER NUMBERS);

    CREATE TABLE AS TN_TAB TYPE OF TYPES_AND_NUMBERS;


    CREATE TABLE PLAN_TRANSACTION
    (THE ARGUMENT PLAN_ID VARCHAR2 (20),)
    PLAN_NUMBERS TN_TAB
    )
    THE NESTED TABLE PLAN_NUMBERS
    STORE AS NESTED_PLAN_NUMBERS;


    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    My question is...

    Q1) is my way of creating a correct nested table?... creating an object type, then an array of objects, then storing this table within a column in a nested table...

    Q2) is otherwise easier to create a nested table as I quite new in object_relational--concepts simply, I felt quite concerned create an object to simulate a line. and create an array of object to store objects, and then put it inside a column.

    Q3) possible for me, or is it something like create type TN_TAB as table of (varchar2 TYPE, numbers);


    Thanks a lot guys!

    Best regards
    Noob

    A nested table is the easiest way to resolve this condition.
    Other solutions might involve some large objects (CLOB or XMLTYPES), but without knowing anything commercially, I think a nested table is the best way.

  • The Oracle table object type - error

    Hello

    I created an oracle object as

    [CREATE or REPLACE TYPE t_test_obj () IS OBJECT
    TestId INTEGER,
    testdesc VARCHAR2 (64)
    );]

    Then created the type from above table

    [create or replace type t_table in table of the t_test_obj;]

    I want to create the table containing the type above as below

    create the table t_tab_test (test1 t_table); but I got the error as
    ERROR on line 1:
    ORA-22913: must specify the name of the table for the nested table column or attribute

    ---
    Requirement: As my function returns this object of type table and I want to insert these values in a table where I want this. All other pointers are also useful.


    Help, please.

    Kind regards
    Kapil

    and with a function

    create function f_test
    return t_table
    as
    begin
       return t_table (t_test_obj (1, 'first'), t_Test_obj (2, 'seconde'));
    end;
    /
    
    insert into t_tab_test values (10, f_test);
    
  • Filter for a specific value object type

    I would like to know if the documents loaded on an object type can be interrogated for a specific value. For ex, I wanted to fetch all the records of the emp and load it into an object. I wanted to ask the object out of the loop to query for a specific deptno. I understand a query simpe SQL would be much faster in the scenario below, but the report itself used in our system uses several tables and some of them have millions of records from different sources as accounts suppliers, accounts receivable, accounting, etc. and they are treated differently for each source before that the result will be published the report. I took the table emp for example and wanted to know if the type of object can be queried for a specific column outside the loop.

    DECLARE

    CURSOR cur_emp IS SELECT * FROM EMP;

    TYPE emp_obj IS TABLE OF cur_emp % ROWTYPE INDEX BY PLS_INTEGER;

    l_emp_tab emp_obj;

    BEGIN

    OPEN cur_emp.

    LOOP

    Get the cur_emp COLLECT LOOSE l_emp_tab LIMIT 1000;

    EXIT WHEN l_emp_tab.count = 0;

    BECAUSE me IN 1.l_emp_tab.count

    Loop

    dbms_output.put_line (' Ename:' | l_emp_tab (i) .ename |', Deptno:' | .deptno l_emp_tab (i));

    END LOOP;

    END LOOP;

    -Can I ask specific employee to a deptno outside the loop FOR without using a temporary table

    -something like "SELECT * FROM TABLE (type_name) WHERE DEPTNO = x_Deptno.

    END;

    /

    In a collection of table selection is not effective, there are better ways to do it.

    Why not create a view?

    create view...

    Select * from source1 Union all the

    Select * from source2 Union all the

    Select * from source3

    -or-

    Using ref cursor return... clause, so you can make conditional cursors

    If somecondition then

    Open the NEWS for

    Select * source1;

    on the other

    Open the NEWS for

    Select * from source2.

    end if;

    -or-

    Dynamics based SQL ref cursor

    DECLARE

    TYPE EmpCurTyp IS REF CURSOR;

    v_emp_cursor EmpCurTyp;

    employees emp_record % ROWTYPE;

    v_stmt_str VARCHAR2 (200);

    v_e_job employees.job%TYPE;

    BEGIN

    -Dynamic SQL statement with placeholder:

    v_stmt_str: = ' SELECT * FROM employees WHERE job_id =: I;

    -Open the cursor & specify bind argument in the USING clause:

    V_emp_cursor OPEN FOR v_stmt_str with the HELP of 'MANAGER ';

    -Extraction of the lines of result set one at a time:

    LOOP

    SEEK v_emp_cursor INTO emp_record;

    EXIT WHEN v_emp_cursor % NOTFOUND;

    END LOOP;

    -Close the cursor:

    CLOSE V_emp_cursor;

    END;

    /

    -or-


    Load in an intermediate table (as a temporary table)

  • Define a map or ORDER method for the object type

    Hi gurus

    I created an object and then its type and then I use this object and type based on line, see below:

    Create the object

    CREATE OR REPLACE

    TYPE test_object

    IS

    OBJECT

    (

    next_appearance_dt DATE, - next_appearance_dt

    youth_adult VARCHAR2 (5) - youth_adult

    ) ;


    /

    Create the object Type

    CREATE or REPLACE TYPE t_docket_object IS TABLE OF THE test_object;

    /

    Create function Pipeline

    FUNCTION to CREATE or REPLACE f_report (p_dt date, p_c_cd VARCHAR2)
    return t_test_object pipeline
    IS
    BEGIN
    FOR J IN)
    Select distinct test_object)
    next_appearance_dt,--862,
    'YOUTH '.
    ) AS test_object
    Jen.next_appearance base
    WHERE 1 = 1
    AND (base.next_appearance_dt = p_dt)
    AND (base.circuit_point_cd = p_c_cd)
    - and cse.information_id = 322
    -ORDER 15 - alias_name
    )

    loop
    PIPE ROW (J.test_object);
    END loop;
    END;

    /

    Run function

    SELECT * FROM TABLE (F_REPORT (TO_DATE('25-sep-2015','dd-mon-yyyy'),'1 '))

    Error

    ORA-22950: cannot ORDER objects without map or ORDER method

    ORA-06512: at "F_REPORT", line 5

    22950 00000 - "cannot ORDER objects without map or ORDER method.

    * Cause: an object type must have a defined for map or ORDER method

    all comparisons other than equality and inequality comparisons.

    * Action: Define a map or ORDER method for the object type

    I know the reason of this error and the reason is that I use the clause separate in my pipeline service, but do not know how to get rid of this error...

    Confuse you the type of table with the object type. He forge

    Select test_object (next_appearance_dt) test_object

    Not:

    Select t_test_object (next_appearance_dt) test_object

    Then:

    SQL > CREATE OR REPLACE
    FUNCTION f_report (DATE p_dt 2,
    3 P_C_CD VARCHAR2
    4                   )
    5 t_test_object of RETURN
    6 IN PIPELINE
    7 EAST
    BEGIN 8
    9 FOR (IN) v_rec
    10 WITH () DID
    11. SELECT TO_DATE('01-jan-2015','dd-mon-yyyy') NEXT_APPEARANCE_DT
    the double 12
    13                                  )
    14 select test_object (next_appearance_dt) test_object
    15                          from  t
    16                      ) LOOP
    PIPE 17 ROW (v_rec.test_object);
    18 END OF LOOP;
    END 19;
    20.

    The function is created.

    SY.

  • The procedure with parameter output from test object type

    I have the sub object created with spec and body type.

    I need to test the procedure seen ino parameter object type.

    could you please help me test the procedure!

    create or replace type typ_obj_test as object
    (
       a_date   date,
       a_type   varchar2(10),
       a_status varchar2(2),
       descr    varchar2(10),
       a_id     number(10),
       constructor function typ_obj_test(a_date   date
                                        ,a_type   varchar2 default null
                                        ,a_status varchar2 default null
                                        ,descr    varchar2 default null
                                        ,a_id     number default null) return self as result
    );
    /
    create or replace type body typ_obj_test is
       constructor function typ_obj_test(a_date   date
                                        ,a_type   varchar2 default null
                                        ,a_status varchar2 default null
                                        ,descr    varchar2 default null
                                        ,a_id     number default null) return self as result is
          v_test varchar2(1);
          v_id   number(10);
       begin
          self.a_date   := a_date;
          self.a_type   := a_type;
          self.a_status := a_status;
          self.descr    := descr;
          self.a_id     := a_id;
          return;
       end;
    end;
    /
    create or replace procedure p_obj_test(p_obj_param in out typ_obj_test) is
    begin
       dbms_output.put_line('Checking the object type' || p_obj_param.a_date || '@' || p_obj_param.a_type || '@' || p_obj_param.a_status || '@' ||
                            p_obj_param.descr || '@' || p_obj_param.a_id);
    end;
    /
    

    You seem to be missing a table that could hold the object. See the next topic, especially the line # 43:

    Connected to:
    Oracle Database 11g Release 11.2.0.3.0 - 64bit Production
    
    SQL> create or replace type typ_obj_test as object
      2  (
      3    a_date  date,
      4    a_type  varchar2(10),
      5    a_status varchar2(2),
      6    descr    varchar2(10),
      7    a_id    number(10),
      8    constructor function typ_obj_test(a_date  date
      9                                      ,a_type  varchar2 default null
    10                                      ,a_status varchar2 default null
    11                                      ,descr    varchar2 default null
    12                                      ,a_id    number default null) return self as result
    13  );
    14  /
    
    Type created.
    
    SQL> create or replace type body typ_obj_test is
      2    constructor function typ_obj_test(a_date  date
      3                                      ,a_type  varchar2 default null
      4                                      ,a_status varchar2 default null
      5                                      ,descr    varchar2 default null
      6                                      ,a_id    number default null) return self as result is
      7        v_test varchar2(1);
      8        v_id  number(10);
      9    begin
    10        self.a_date  := a_date;
    11        self.a_type  := a_type;
    12        self.a_status := a_status;
    13        self.descr    := descr;
    14        self.a_id    := a_id;
    15        return;
    16    end;
    17  end;
    18  /
    
    Type body created.
    
    -- Create a Nested table type array of above object type
    SQL> create or replace type nt_typ_obj_test as table of typ_obj_test;
      2  /
    
    Type created.
    
    -- Keep in out parameter's type as the nested table type
    -- modified the proc to do loop so that multiple records can be passed via object type
    SQL> create or replace procedure p_obj_test(p_obj_param in out nt_typ_obj_test) is
      2  begin
      3  for i in p_obj_param.first..p_obj_param.last
      4  loop
      5    dbms_output.put_line('Checking the object type' || p_obj_param(i).a_date || '@' || p_obj_param(i).a_type || '@' || p_obj_param(i).a_status || '@' ||
      6                          p_obj_param(i).descr || '@' || p_obj_param(i).a_id);
      7  end loop;
      8  end;
      9  /
    
    Procedure created.
    
    --Call the procedure
    SQL> set serveroutput on
    SQL> declare
      2  i_nt_typ nt_typ_obj_test ;
      3  begin
      4  i_nt_typ:=nt_typ_obj_test(typ_obj_test(sysdate,'A','Y','Descr',23),typ_obj_test(sysdate,'X','Z','ewe',55));
      5  p_obj_test(i_nt_typ);
      6  end;
      7  /
    Checking the object type26-MAR-15@A@Y@Descr@23
    Checking the object type26-MAR-15@X@Z@ewe@55
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • Impdp ORA-39083 error: INDEX could not create with object type error:

    Hi Experts,

    I get the following error when importing schema HR after a fall it. The DB is r12.1.3 11.2.0.3 & ebs


    I did export with this command.

    patterns of HR/hr = hr = TEST_DIR dumpfile = HR.dmp logfile directory expdp = expdpHR.log statistics = none

    that the user HR with the option drop waterfall.


    And try to import it HR schemas in the database by the following.

    Impdp System/Manager schemas = hr = TEST_DIR dumpfile = HR.dmp logfile directory = expdpHR.log statistics = none

    Here is the error

    imported 'HR '. "" PQH_SS_PRINT_DATA "0 KB 0 rows

    ... imdoor 'HR '. "" PQH_TJR_SHADOW "0 KB 0 rows

    . . imported 'HR '. "" PQH_TXN_JOB_REQUIREMENTS "0 KB 0 rows

    . . imported 'HR '. "" PQH_WORKSHEET_BUDGET_SETS_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQH_WORKSHEET_DETAILS_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQH_WORKSHEET_PERIODS_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQP_ALIEN_TRANSACTION_DATA "0 KB 0 rows

    . . imported 'HR '. "" PQP_ANALYZED_ALIEN_DATA "0 KB 0 rows

    . . imported 'HR '. "" PQP_ANALYZED_ALIEN_DETAILS "0 KB 0 rows

    . . imported 'HR '. "" PQP_EXCEPTION_REPORTS_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQP_EXT_CROSS_PERSON_RECORDS "0 KB 0 rows

    . . imported 'HR '. "" PQP_FLXDU_FUNC_ATTRIBUTES "0 KB 0 rows

    . . imported 'HR '. "" PQP_FLXDU_XML_TAGS "0 KB 0 rows

    . . imported 'HR '. "" PQP_GAP_DURATION_SUMMARY "0 KB 0 rows

    . . imported 'HR '. "" PQP_PENSION_TYPES_F_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQP_SERVICE_HISTORY_PERIODS "0 KB 0 rows

    . . imported 'HR '. "" PQP_VEHICLE_ALLOCATIONS_F_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQP_VEHICLE_DETAILS_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQP_VEHICLE_REPOSITORY_F_EFC "0 KB 0 rows

    . . imported 'HR '. "" PQP_VEH_ALLOC_EXTRA_INFO "0 KB 0 rows

    . . imported 'HR '. "" PQP_VEH_REPOS_EXTRA_INFO "0 KB 0 rows

    Processing object type SCHEMA_EXPORT/TABLE/SCHOLARSHIP/OWNER_GRANT/OBJECT_GRANT

    Processing object type SCHEMA_EXPORT/TABLE/SCHOLARSHIP/CROSS_SCHEMA/OBJECT_GRANT

    Object type SCHEMA_EXPORT/TABLE/COMMENT of treatment

    Object type SCHEMA_EXPORT/PACKAGE/PACKAGE_SPEC of treatment

    Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC

    Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX

    Processing object type SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_INDEX/INDEX

    Object type SCHEMA_EXPORT/TABLE/CONSTRAINT/treatment

    Object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS of treatment

    Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_INDEX/INDEX_STATISTICS

    Object type SCHEMA_EXPORT/PACKAGE/PACKAGE_BODY of treatment

    Object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT of treatment

    Object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS treatment

    Processing object type SCHEMA_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX

    ORA-39083: Type what INDEX failed to create object error:

    ORA-29855: an error has occurred in the execution of routine ODCIINDEXCREATE

    ORA-20000: Oracle text error:

    DRG-50857: error oracle in drvxtab.create_index_tables

    ORA-00959: tablespace "APPS_TS_TX_IDX_NEW" does not exist

    Because sql is:

    CREATE INDEXES ' HR'.»» IRC_POSTING_CON_TL_CTX' ON 'HR '. "" INDEXTYPE IRC_POSTING_CONTENTS_TL "("NAME") IS"CTXSYS. "' CONTEXT ' PARALLEL 1

    Processing object type SCHEMA_EXPORT/POST_SCHEMA/PROCACT_SCHEMA

    Work 'SYSTEM '. "" SYS_IMPORT_SCHEMA_01 "completed with error (s 1) at 11:16:07

    SQL > select count (parameter), object_type from dba_objects where owner = 'HR' group by object_type.

    OBJECT_TYPE COUNT (OBJECT_NAME)

    ------------------ -------------------

    INDEX 37 PARTITION

    SEQUENCE OF 799

    TABLE 12 PARTITION

    LOB 70

    4 BODY PACKAGE

    PACKAGE OF 4

    3 RELAXATION

    2936 INDEX

    TABLE OF 1306

    Could you please suggest.

    Thank you

    MZ

    MZ,

    I get the following error when importing schema HR after a fall it. The DB is r12.1.3 11.2.0.3 & ebs


    Export and import of individual patterns of Oracle E-Business Suite stocked are not supported as this will violate referential integrity (except for custom schemas provided, you have no dependencies).

    Thank you

    Hussein

  • Array of objects type

    Hi all

    I have a problem with my pl/sql code. I would refer to an array of types of objects as reference, not a copy.

    I send you my sample code.

    As you can see, mytype is the object, I use a "table with" to create a table. The function 'myfunc' illustrates the problem: I create an instance of the object named "mis1", I put one of its variable (date) and I create the table arrmytype and copy the mis1 as arrmytype (1)

    Now the question: if I change mis1 arrmytype (1) does not alter it. I think that arrmytype (1) is a copy of mis1 and not a reference.

    Am I wrong? How can I refer mis1 in a referenced table? Can I change the ' table a ' in something else...

    create or replace type mytype as object

    (

    LDate date,

    constructor function mytype self return as a result.

    Members procedure setDate (date of update)

    );

    /

    create or replace type body as mytype

    constructor function mytype

    return self as result that

    Start

    null;

    end;

    Members procedure setdate (date of update) as

    Start

    LDate: = pdate;

    end setdate;

    end;

    /

    create or replace type arrmytype in the table of mytype;

    /

    create or replace FUNCTION myfunc RETURN varchar2

    AS

    arrObj arrmytype: = arrmytype();

    MIS1 mytype;

    date of l_tmp1;

    VARCHAR2 (100) retval;

    BEGIN

    MIS1: = new mytype();

    MIS1. SetDate (sysdate);

    l_tmp1: = mis1.ldate;

    arrObj.EXTEND;

    arrObj (arrObj.COUNT): = mis1.

    MIS1. SetDate (sysdate);

    l_tmp1: = arrObj (arrObj.COUNT) .ldate;

    l_tmp1: = mis1.ldate;

    RETURN retval;

    MyFunc END;

    /

    Federico wrote:

    I would like to refer as:

    v_var1: = 9;

    v_var2: = &v_var1; -as a code c ++

    The PL/SQL language does not support pointers as a data type. Well, not exactly true because it supports locators that are pointers. But locators are limited to the type of LOB data.

    So unfortunately you can't assign a reference to a variable/object in an array to a variable of pointer for quick reference. It's too bad that there is no pointer in PL/SQL data type as it is in C/C++ and Pascal.

    But then on the other hand, just look at how programmers say substance completely upward using PL/SQL without pointers, to realize that PL/SQL programming to quality would have been much worse if the language supported for pointers. Not that this is a valid reason for PL/SQL not support pointers.

    At least he could support the Pascal WITH clause which allows to define the scope and then resolve the name references in this scope...

  • Value data named to bind variables of Type table

    Hello

    I have a display object with a query that has a where clause, clause which use 'en' (e.g. Select projTitle PROJECT where PROJID in: projIds)

    'projIds' is a variable of type table of liaison.

    I'm moving in that variable binding expects (an array of projIds that can be used by the sql statement), and I did not. I'm calling a method in the bean to support the named child tag data from the action tag in the pageDef file links section.

    Can you give me the proper syntax and object Array as this variable binding will accept, please? Maybe I used the wrong NDType? I found a couple of different options, but none that I can make it work.

    The page definition file:

    < action IterBinding = "ProjPendingApprovalByApproverVO1Iterator" id = "loadPendingApproval".

    InstanceName = "SystemAMDataControl.RooProjIdArrayt.ApprovalAM1.ProjPendingApprovalByApproverVO1"

    DataControl = "SystemAMDataControl" RequiresUpdateModel = "true" Action = "executeWithParams" >

    < NamedData NDName = 'PROJID"NDValue =" #{dashboard.projIdArray} "NDType="oracle.jbo.domain.Array"/ >"

    < / action >

    Application of VO:

    SELECT ProjectEO.PROJ_ID,

    ProjUtnDtlEO.UTN_TYPE,

    ProjectEO.PROJ_SHORT_DESC,

    ProjUtnDtlEO.PROJ_DTL_ID,

    ProjectEO.PROJ_OWNER,

    VEmployeeInfoEO.FIRST_NAME,

    VEmployeeInfoEO.EMPLOYEE_ID,

    VEmployeeInfoEO.FIRSTNAMELASTNAME,

    VEmployeeInfoEO.LAST_NAME,

    VEmployeeInfoEO.LASTNAMEFIRSTNAME,

    ProjApprovalDecisionDtlEO.PROJ_APPROVAL_DECISION_DTL_ID,

    ProjApproverEO.PROJ_APPROVER_ID,

    ProjApproverEO.APPROVER_LEVEL,

    ProjApproverEO.APPROVER_NUMBER,

    ProjApproverEO.APPROVER_ROLE,

    ProjApprovalDecisionDtlEO.COMMENTS,

    ProjApprovalDecisionDtlEO.PROJ_APPROVAL_DECISION_ID,

    ProjApprovalDecisionDtlEO.LASTUPDATEDBY,

    ProjApprovalDecisionDtlEO.APPROVEDDATE,

    ProjectEO.SYS_STATUS,

    ProjApproverEO.LASTUPDATEDBY AS LASTUPDATEDBY1,

    ProjApprovalDecisionDtlEO.PROJ_APPROVAL_TYPE_ID,

    ProjStatusLkpEO.STATUS_DESC,

    ProjStatusLkpEO.PROJ_STATUS_ID,

    ProjectEO.PROJ_CATEGORY_ID,

    STRING. APPROVAL_DESC

    OF PTS. ProjectEO PROJECT,

    PTS. PROJ_UTN_DTL ProjUtnDtlEO,

    PTS. V_EMPLOYEE_INFO VEmployeeInfoEO,

    PTS. PROJ_APPROVAL_DECISION_DTL ProjApprovalDecisionDtlEO,

    PTS. PROJ_APPROVER ProjApproverEO,

    PTS. PROJ_STATUS_LKP ProjStatusLkpEO,

    PTS. Channel PROJ_APPROVAL_CHAIN_LKP

    WHERE ((ProjectEO.PROJ_ID = ProjUtnDtlEO.PROJ_ID (+))

    AND (ProjectEO.PROJ_ID = ProjApprovalDecisionDtlEO.PROJ_ID))

    AND (ProjectEO.PROJ_ID = ProjApproverEO.PROJ_ID)

    AND (ProjectEO.SYS_STATUS = ProjStatusLkpEO.SYS_STATUS)

    AND (ProjectEO.PROJ_OWNER = VEmployeeInfoEO.EMPLOYEE_ID)

    AND (ProjApprovalDecisionDtlEO.PROJ_APPROVER_ID = ProjApproverEO.PROJ_APPROVER_ID)

    and PROJAPPROVEREO. PROJ_APPROVAL_CHAIN_ID = STRING. PROJ_APPROVAL_CHAIN_ID

    AND (ProjApprovalDecisionDtlEO.PROJ_APPROVAL_DECISION_ID = 0)

    and PROJAPPROVEREO. APPROVER_LEVEL <>2

    and PROJAPPROVEREO. PROJ_ID in: PROJID

    Thank you!


    Please refer to http://www.jobinesh.com/2010/09/using-bind-variable-for-sql-statements.html?m=1 for an example of this.

    Timo

  • SQL with the Table using nested

    Hello

    Please help how to do that thing

    I have a nested table of object type

    create or replace type a1 as an object

    (

    a number,

    b varchar2 (30),

    VARCHAR2 (30) region

    );

    create table a1 type a1_array s;

    declare

    v_a1 a1;

    v_a1_array a1_array:=a1_array();

    Start

    v_a1 = a1 (1, '1', 'AUS');

    v_a1_array. EXTEND;

    v_a1_array (1): = v_a1;

    v_a1 = a1 (2, '2', 'AUS');

    v_a1_array. EXTEND;

    v_a1_array (2): = v_a1;

    v_a1 = a1 (3, '3', 'NAM');

    v_a1_array. EXTEND;

    v_a1_array (3): = v_a1;

    end;

    Now, I v_a1_array have 3 row 2 with region AUS and the other with NAM region.

    SQL help can I get lines only "AUS" and look in the TABLE OF TYPE v_a1_array (using Where clause and functions (Table))

    Any help will be much appreciated. Please help. I have Oracle 11g

    Thank you

    I hope that you are looking for this.

    pretend like your excel temp (with clause)

    v_a2 - is a type of a1_array

    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

    SQL > DROP TYPE a1_array;

    Type fell.

    SQL > DROP TYPE a1;

    Type fell.

    SQL > CREATE or REPLACE TYPE a1 AS OBJECT
    2 (a NUMBER, b VARCHAR2 (30), region VARCHAR2 (30));
    3.

    Type of creation.

    SQL > CREATE TYPE a1_array IS TABLE of a1;
    2.

    Type of creation.

    SQL > DECLARE
    v_a1 2 a1_array;
    3 v_a2 a1_array;
    4 BEGIN
    5 WITH temp
    6 AS (SELECT 1 a, 1 b, "AUS" AS region FROM DUAL
    7 UNION ALL
    8. SELECT 2 AS a, 2 b, "AUS" AS region FROM DUAL
    9 UNION ALL
    10. SELECT 3 a, b '3', 'NAM' AS region OF DOUBLE)
    11. SELECT a1 (x.a, x.b, x.region)
    In BULK 12 COLLECT IN v_a1
    Temp 13 x;
    14
    15 SELECT a1 (x.a, x.b, x.region)
    In BULK 16 COLLECT IN v_a2
    TABLE (v_a1) 17 x
    18 WHERE x.region = 'NAM ';
    19
    20
    21 FOR I IN 1... v_a2. COUNTY
    22 LOOP
    (23) DBMS_OUTPUT.put_line
    24 v_a2 (i) .a | '-' || v_a2 (i) .b | '-' || v_a2 (i) .region);
    25 END OF LOOP;
    26 END;
    27.
    3-3-NAM

    PL/SQL procedure successfully completed.

    SQL > spool off;

Maybe you are looking for

  • Windows Media Player 11 has stopped playing some of my MP3s. Any ideas on how to solve this?

    I have a desktop Dell Dimension running XP. I uninstalled Real Player and Rhapsody, just in case they were causing problems, but that did not work. Here is what I noticed: WMP plays still files were extracted a CD, the songs that were purchased from

  • Back to the top took a lot of time

    Hello I tried to start my mobile z2 through pc sony champion, but it took more than 12 hours and the end was not so please suggestions for this problem. Mobile on the latest version of sw

  • Windows 8, how to check which account I am on

    I have this issue several times being on the computer of the family, under windows 7 I click the button START, and I see the account name, I'm now on the top right of the menu open. What about Windows 8, what is the easiest way to find it?  I can ope

  • Using the result of the Action as input for one other Action - is not possible?

    HelloI have something I call the presentation. According to our phases of deployment, it will return the fields it is possible to select.Domain-> GetAction("com.companyxyz.presentation","getDomainsForDeploymentStage").call (#deploymentStage)Then I wa

  • Percentage of occurrence of a value in a Table

    Hello I try to get the percetage of the occurrence of a value in a table. Say for example: <?-foreach: employee? >, I have one of the fields that the status of registration. I need to calculate the percentage of registration status "verified". I'm tr