Defining nested table storage for UDT within another UDT

If I have two types, a FOO UDT which contains a BAR UDT, like this:
CREATE TYPE FOO AS OBJECT (
MY_BAR BAR
CREATE TYPE BAR AS OBJECT (
A_NESTED_TABLE NESTED_TABLE_TYPE
Now when I create a table of FOO, I need to define the storage for the nested table within FOO's BAR. What is the correct syntax to that? This does not work, naturally because it doesn't specify that A_NESTED_TABLE belongs to BAR, not FOO.
create table FOO_TAB OF FOO
nested table A_NESTED_TABLE STORE AS A_NESTED_TABLE_STORAGE;

sb92075 wrote:
nested tables are evil & should be avoided.
they buy nothing but heartburn & grief.I agree. I'm finding them difficult to work with but I am biased towards a relational model because I've always worked with tables and constraints.

Similar Messages

  • XSLT for-each within another for-each

    Hi All,
    My XSLT mapping needs to pick a field(BOL) from the Header and the using that, search the Items node for the matching BOL and generate the output accordingly.
    My current XSLT is as follows(not the entire program, just the snippet)
         <xsl:for-each select="ns0:Messages/ns0:Message1/ns1:MT_Header/Header">
                          <xsl:param name="search"><xsl:value-of select="bol"/></xsl:param>
         <xsl:for-each select="ns0:Messages/ns0:Message2/ns1:MT_Items/Item[BOL=$search]">
                  <Output>
                     <BOL_ITEM><xsl:value-of select="BOL_ITEM"/></BOL_ITEM>
                </Output>     
         </xsl:for-each>
         </xsl:for-each>
    The following code works correctly(without the outer for-each and with hardcoding)
                             <xsl:param name="search">100</xsl:param>
         <xsl:for-each select="ns0:Messages/ns0:Message2/ns1:MT_Items/Item[BOL=$search]">
                  <Output>
                     <BOL_ITEM><xsl:value-of select="BOL_ITEM"/></BOL_ITEM>
                </Output>     
         </xsl:for-each>
    So its the for-each within another for-each that does not work . Is there some syntax problem ? Or another way to achieve this in XSLT?

    Closing this thread

  • Incorrectly defined logical table source (for fact table X

    Hi!
    Imagine the following Physical Diagram:
    - Dim A
    - Dim B
    - Fact A
    - Fact B
    Joins:
    - Dim A is parent of Dim B
    - Fact B has a FK to Dim B
    - Fact A has a FK to Dim A
    Business Layer:
    - Logical Table Dim A
    - Logical Table Dim B
    - Logical Table Fact A
    - Logical Table Fact B
    Joins:
    - same joins (not FK Joins) that Physical Layer
    When we build a report that only has one column of Dim A and one column of Dim B (A is parent of B), the following error appears:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table "Fact A") does not contain mapping for [Dim A.col1, Dim B.col1]. (HY000)
    What is wrong?
    Help!
    Thanks.

    Hi,
    The joins of dimensions go via a fact table. In your case there is no common fact table.
    You can solve this by drag/drop a field from the physical table Dim B on the displayed logical table source of the logical table Dim A.
    Now the BI Server knows that Dim A and B have a physical relationship.
    Regards

  • Incorrectly defined logical table source (for fact table Facts) does not

    Hi,
    I have two Dimensions A and B. A is joined to B by a foreign Key.
    The report works if I pull B. Column1, A.Column2.
    The report is throwing an error if i try to change the order of the columns like this. A.Column2, B. Column1.
    error : Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    File: odbcstatementimpl.cpp, Line: 186
    State: S1000. Code: 10058. [NQODBC] [SQL_STATE: S1000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table Facts) does not contain mapping for B.Column1
    I am not sure where it is going wrong.
    Thanks
    jagadeesh
    Edited by: Jagadeesh Kasu on Jun 16, 2009 4:22 PM

    did you make joins in LTS or on the physical table.
    try to make join in LTS if they are not there.

  • No vendor defined in Table T321 for ref. movement type 632

    Hello Friends,
    We are facing strage issue during trasfer movement from SAP ECC to SAP WM, the scenario is as follows -
    For the Consignment returns (from Consignment stock to warehouse), we are using 632 movement type of transfer movement transaciton MB11.  When executing the document, system showing the following error message -
    No vendor defined in Table T321 for ref. movement type 632  
    We checked the entries, I am not able find the problem...Please suggest
    Apreciate your feedback.  Thanks
    Best Regards,
    Goutham

    looks like your WM is defined as decentralized system.
    The message number is L9 524
    And system expects vendor number for the inbound deliveries.
    I wonder anyhow why you are using MB11 transaction for 632 movement (which is an automatic movement triggered from a SD document)

  • A 'For' loop within another 'For' loop

    This is the loop:
    for (int i = 1; i<=5; i++) {
    for (int k = 1; k<=3; k++) {
    System.out.println("i is " + i + ", k is " + k);
    How does it execute? After it goes through the loop i = 1, and k = 1, apparently it then doesn't go to i = 2, but instead it increments k to 2, and i remains as 1 until k is greater than 3. I'm confused how this works. Does the first loop execute first, and then the second loop executes, but then the program exits out of the second loop only when k is greater than 3?
    Much appreciate your help.
    Yash

    Try to imagine expanding the loops. In the example you provided, the loops aren't that big, so it's pretty easy.
    for (int i = 1; i<=5; i++) {
      for (int k = 1; k<=3; k++) {
        System.out.println("i is " + i + ", k is " + k);
    }becomes
    int i = 1;
      for (int k = 1; k<=3; k++) {
        System.out.println("i is " + i + ", k is " + k);
    i = 2;
      for (int k = 1; k <= 3; k++) {
        System.out.println("i is " + i + ", k is " + k);
    i = 3;
      for (int k = 1; k <= 3; k++) {
        System.out.println("i is " + i + ", k is " + k);
    i = 4;
      for (int k = 1; k <= 3; k++) {
        System.out.println("i is " + i + ", k is " + k);
    i = 5;
      for (int k = 1; k <= 3; k++) {
        System.out.println("i is " + i + ", k is " + k);
      }which becomes
    int i = 1;
      int k = 1;
        System.out.println("i is " + i + ", k is " + k);
      k = 2;
        System.out.println("i is " + i + ", k is " + k);
      k = 3;
        System.out.println("i is " + i + ", k is " + k);
    i = 2;
      k = 1;
        System.out.println("i is " + i + ", k is " + k);
      k = 2;
        System.out.println("i is " + i + ", k is " + k);
      k = 3;
        System.out.println("i is " + i + ", k is " + k);
    i = 3;
      k = 1;
        System.out.println("i is " + i + ", k is " + k);
      k = 2;
        System.out.println("i is " + i + ", k is " + k);
      k = 3;
        System.out.println("i is " + i + ", k is " + k);
    i = 4;
      k = 1;
        System.out.println("i is " + i + ", k is " + k);
      k = 2;
        System.out.println("i is " + i + ", k is " + k);
      k = 3;
        System.out.println("i is " + i + ", k is " + k);
    i = 5;
      k = 1;
        System.out.println("i is " + i + ", k is " + k);
      k = 2;
        System.out.println("i is " + i + ", k is " + k);
      k = 3;
        System.out.println("i is " + i + ", k is " + k);

  • Trigger how to get new and old value for nested table column?

    Hi,
    I have created a nested table based on the following details:
    CREATE TYPE typ_item AS OBJECT --create object
    (prodid NUMBER(5),
    price NUMBER(7,2) )
    CREATE TYPE typ_item_nst -- define nested table type
    AS TABLE OF typ_item
    CREATE TABLE pOrder ( -- create database table
    ordid NUMBER(5),
    supplier NUMBER(5),
    requester NUMBER(4),
    ordered DATE,
    items typ_item_nst)
    NESTED TABLE items STORE AS item_stor_tab
    INSERT INTO pOrder
    VALUES (800, 80, 8000, sysdate,
    typ_item_nst (typ_item (88, 888)));
    Now I would like to create a trigger on table pOrder for after insert or update or delete
    and I would like to track the new and old value for the columns inside nested table.
    Can anybody direct me how to do it?
    I would like to know the sytax for it like:
    declare
    x number;
    begin
    x := :new.nestedtablecolumn;--how to get the new and old value from nested table columns
    end;
    Hope my question is clear.
    Thanks,
    Lavan

    Hi,
    Try like this:
    CREATE OR REPLACE TRIGGER PORDER_I
    BEFORE INSERT
    ON PORDER
    REFERENCING OLD AS old NEW AS new
    FOR EACH ROW
    DECLARE
      items_new typ_item_nst;
      ordid_NEW NUMBER;
    BEGIN
    FOR i IN :new.items.FIRST .. :new.items.LAST LOOP -- For first to last element
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').prodid: ' || :new.items(I).prodid );
      DBMS_OUTPUT.PUT_LINE(':new.items(' || I || ').price:  ' || :new.items(I).price );
    END LOOP;
    END;Regards,
    Peter

  • Need to return dynamic column names for a function returning nested table

    I am having a pl/sql function which is returning a nested table.
    For this i have defined an object which is having 4 attributes- 1 number type, 3 varchar2 type -p1,p2,p3.
    My function is taking input parameter v1,v2,v3 all of varchar2 type.Inside the function body,i am using these (v1,v2,v3) to filter data from an sql query and i am also
    using pivot function in this sql query.
    At the end my function is returning the object as defined in the starting .
    When i am excuting this function,thru select statement :
    select * from table(f1_test('A','B','C'));
    i am geting p1,p2,p3 as column name ,which are names used when i had defined object type.Instead i want column name to be dynamic (wotever i am passing in function as
    parameter while executing the function ,here A,B,C)
    Please help me in geting column names dynamic as passed in input parameter (i.e A,B,C for this case )
    Sample code for the problem:
    create or replace TYPE obj1 AS OBJECT
    ( id number(5,0)
    ,p1 varchar2(10),
    ,p2 varchar2(10)
    ,p3 varchar2(10)
    create or replace TYPE tt1 AS TABLE OF OBJ1;
    create or replace
    function f1_test (v1 varchar2,v2 varchar2,v3 varchar2)
    return tt1 as
    v_return tt1 ;
    v_str varchar2(30000);
    begin
    v_str:='
    select
    cast(
    multiset(
    select * from
    select
    aa.report_id
    ,cc.name
    ,e.amount
    from
    aa,cc,e
    where
    <join conditions>
    and cc.name in ('''||v1||''','''||v2||''','''||v3||''')
    pivot (sum (amount) for name in ('''||v1||''' as '||v1||','''||v2||''' as '||v2||','''||v3||''' as '||v3||'))
    as tt1)
    from
    dual';
    dbms_output.put_line(v_str);
    execute immediate v_str
    into
    v_return ;
    return v_return;
    end;
    Edited by: 845831 on 20 Mar, 2011 12:15 PM

    select id,p1 A,p2 B,p3 C from table(f1_test('A','B','C'));
    drop function f1_test;
    drop type tt1;
    drop type obj1;
    create or replace TYPE obj1 AS OBJECT
    ( id number(5,0)
    ,p1 varchar2(10)
    ,p2 varchar2(10)
    ,p3 varchar2(10)
    create or replace TYPE tt1 AS TABLE OF OBJ1;
    CREATE OR REPLACE
      FUNCTION f1_test(
          v1 VARCHAR2,
          v2 VARCHAR2,
          v3 VARCHAR2)
        RETURN tt1
      AS
        v_return tt1 ;
        v_str VARCHAR2(30000);
      BEGIN
        v_str:='select cast(multiset(select 1,''20'',''30'',''40'' from dual) as tt1) from dual';
        dbms_output.put_line(v_str);
        EXECUTE immediate v_str INTO v_return ;
        RETURN v_return;
      END;
    /

  • Problem in truncate/drop partitions in a table having nested table columns.

    Hi,
    I have a table that has 2 columns of type nested table. Now in the purge process, when I try to truncate or drop a partition from this table, I get error that I can't do this (because table has nested tables). Can anybody help me telling how I will be able to truncate/drop partition from this table? IF I change column types from nested table to varray type, will it help?
    Also, is there any short method of moving existing data from a nested table column to a varray column (having same fields as nested table)?
    Thanks in advance.

    >
    I have a table that has 2 columns of type nested table. Now in the purge process, when I try to truncate or drop a partition from this table, I get error that I can't do this (because table has nested tables). Can anybody help me telling how I will be able to truncate/drop partition from this table?
    >
    Unfortunately you can't do those operations when a table has a nested table column. No truncate, no drop, no exchange partition at the partition level.
    A nested table column is stored as a separate table and acts like a 'child' table with foreign keys to the 'parent' table. It is these 'foreign keys' that prevent the truncation (just like normal foreign keys prevent truncating partions and must be disabled first) but there is no mechanism to 'disable' them.
    Just one excellent example (there are many others) of why you should NOT use object columns at all.
    >
    IF I change column types from nested table to varray type, will it help?
    >
    Yes but I STRONGLY suggest you take this opportunity to change your data model to a standard relational one and put the 'child' (nested table) data into its own table with a foreign key to the parent. You can create a view on the two tables that can make data appear as if you have a nested table type if you want.
    Assuming that you are going to ignore the above advice just create a new VARRAY type and a table with that type as a column. Remember VARRAYs are defined with a maximum size. So the number of nested table records needs to be within the capacity of the VARRAY type for the data to fit.
    >
    Also, is there any short method of moving existing data from a nested table column to a varray column (having same fields as nested table)?
    >
    Sure - just CAST the nested table to the VARRAY type. Here is code for a VARRAY type and a new table that shows how to do it.
    -- new array type
    CREATE OR REPLACE TYPE ARRAY_T AS VARRAY(10) OF VARCHAR2(64)
    -- new table using new array type - NOTE there is no nested table storage clause - arrays stored inline
    CREATE TABLE partitioned_table_array
         ( ID_ INT,
          arra_col  ARRAY_T )
         PARTITION BY RANGE (ID_)
         ( PARTITION p1 VALUES LESS THAN (40)
         , PARTITION p2 VALUES LESS THAN(80)
         , PARTITION p3 VALUES LESS THAN(100)
    -- insert the data from the original table converting the nested table data to the varray type
    INSERT INTO PARTITIONED_TABLE_ARRAY
    SELECT ID_, CAST(NESTED_COL AS ARRAY_T) FROM PARTITIONED_TABLENaturally since there is no more nested table storage you can truncate or drop partitions in the above table
    alter table partitioned_table_array truncate partition p1
    alter table partitioned_table_array drop partition p1

  • Confusion over nested tables and system generated nested tables

    Hi,
    I have been reading other threads about nested tables, naming and updating them etc, but I have what seems
    to me some odd behaviour.
    I modified my schema to set the attribute xdb:maintainDom to be false for a collection and then registered
    the schema with the generate tables option defaulted to true. The result was that I had to add xdb:tableProps
    attributes specifying nested table storage at each element above the collection element, this was because Oracle
    was creating tables at each level. So I have this kind of thing:
    <xsd:element name="BibPt" xdb:SQLType="BIBPT_T"
      xdb:defaultTable="BIBPT"
      xdb:tableProps="NESTED TABLE XMLDATA.PTEES.PTEE_SEC.PTEE STORE AS NESTED_PTEE_SEC
    NESTED TABLE XMLDATA.INVS.INV STORE AS NESTED_INV_BIBPT TABLESPACE BIBLIO">
    <xsd:element name="Ptees" xdb:SQLType="PTEES_T" xdb:tableProps="NESTED TABLE
    XMLDATA.PTEE_SEC.PTEE STORE AS NESTED_PTEE_SEC2">When I did this the nested tables were created, but when I loaded data never had anything in them. Instead
    I found that nestes tables with systems generated names like "SYSNTxxxxxxxxx" has been created that contained
    the data.
    When I registered the schema without the tables being generated, I created a table with this syntax:
    create table poc_wip2 of xmltype
    xmlschema "http://www.derwent.co.uk/wpi.xsd" element "WPI"
    NESTED TABLE XMLDATA."BibPt".PTEES.PTEE_SEC.PTEE STORE AS NESTED_PTEE_SEC
    NESTED TABLE XMLDATA."BibPt".INVS.INV STORE AS NESTED_INV_BIBPT(Thanks to a posting by Sam Monsarrat which showed me this was possible).
    Now I had my named nested tables, which contained the data after it was loaded and no system named
    nested tables.
    So why the difference?
    In the first instance why do my named nested tables stay empty and why does the data go into system
    generated tables I have no control over as regards tablespace placement?
    Is it possible to have a XML schema registered that only generates tables that I have named with the defaultTable
    attribute, rather than all or nothing?
    And last but not least, what's the best approach for this, since I want to be able to access the data via indexes
    on the nested tables.
    Thanks
    Pete

    Hi Pete
    Would you please publish the schema you are using?
    Thanks,
    Tobias

  • Nested Tables and Advanced Queues- Please Help.

    How do i work with NestedTable type and Advanced Queue.
    I have done the following
    I have Oracle 8.1.7 enterprise edition.
    create type myType as TABLE OF varchar(32);
    create type myObject as OBJECT (
    id int,
    myt myType);
    DECLARE
    BEGIN
    dbms_aqadm.create_queue_table(
    queue_table => 'my_queue_table',
    multiple_consumers => TRUE,
    queue_payload_type => 'myObject',
    compatible => '8.1.3'
    END;
    The Nested Table and Object are created successfully.
    but the queue is not created.
    I get the following message.
    DECLARE
    ERROR at line 1:
    ORA-22913: must specify table name for nested table column or
    attribute
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2012
    ORA-06512: at "SYS.DBMS_AQADM", line 55
    ORA-06512: at line 3
    I know how to specify the nested table storage clause for
    create table statement, but there is no provision for
    it in the create_queue_table procedure.
    Any help will be greately appriciated.
    i have already created and tested aqs with simple data types,
    also i have created simple tables with nested table type
    elements.
    but the combo of Nested tables and AQ is not working.
    thanks in advance.

    Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
    As you suggested me: i have done a block based on a sub-query for the nested-table:
    'select courses from department where name= :department.name'.
    In the master block(department) i have the when-new-record-instance trigger:
    Declare
    LC$Req varchar2(256);
    Begin
    LC$Req := '(select ns.courses from table
    ( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
    Go_block('block11');
    Clear_Block ;
    Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
    Execute_query ;
    End ;
    Now the errors i receive, this time in the runtime mode are:
    - FRM-41380: Cannot set the blocks query data source
    -FRM-41003: This function cannot be performed here.
    Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
    Thank you in advance.

  • Union all-distinct and remove duplicates from nested table?

    Hi all,
    I need a select that will bulk collect some data in my nested table.
    I have two tables from which I need to select all the accounts only once.(remove duplicates).
    Tried to search on the forum...but no luck.
    I have a table with one column:
    create table a1(account_no number);
    and a second table with 3 columns.
    create table a2 (account_no number, name number, desc varchar2 (100));
    I have a nested table like:
    table of a2%rowtype;
    Can I select from this two table in one select and put in my nested table just one row per account?
    if a I have in a 2a row like :
    1 'test' 'test2'
    2 aaaa aa
    and in a1 a row like:
    1
    I want to put in my nested table just (1, null,null and 2,aaaa, aa)) or (1,test,test2 and 2,aaaa, aa). it does no matter what row from those two I insert.
    Second question:
    If I use:
    BANNER
    Oracle9i Release 9.2.0.5.0 - Production
    PL/SQL Release 9.2.0.5.0 - Production
    CORE     9.2.0.6.0     Production
    TNS for 32-bit Windows: Version 9.2.0.5.0 - Production
    NLSRTL Version 9.2.0.5.0 - Production
    SQL>
    what is the best solution to remove duplicates from a neste table like mine?
    I thought that I can build another nested table and loop in my first nt and for each row I check in there was the same account in previous lines.
    it will be like:
    for i in 1....nt_first.count loop
    for j in 1..i loop
        --check if my line was in previous lines. if it was...do not move it in my second collection
    end loop;it is this best option in oracle 9i?

    I have a table with one column:
    create table a1(account_no number);
    and a second table with 3 columns.
    create table a2 (account_no number, name number, desc varchar2 (100));
    all I need are the accounts. the rest ar extra data
    that I can ignore in this step. But if it is
    available, it is ok to use it.
    using one select in this case is is much better that
    trying to remove duplicates parsing some nested table
    with FOR many times?
    Thankshi,
    try to use union. Union automatically removes duplicates between two or more tables.
    with t1 AS
           (select '3300000' account_no FROM DUAL UNION
            select '6500000' account_no FROM DUAL union
            select '6500000' account_no FROM DUAL union
            select '6500000' account_no FROM DUAL union
            select '6500000' account_no FROM DUAL
           select * from t1ACCOUNT_NO
    3300000
    6500000

  • Trigger with Nested Table

    How do I reference a column in a nested table in a trigger. I am issuing an update statement:
    UPDATE TABLE (SELECT inv_level
    FROM inventory_level
    WHERE machine_id = '1111'
    SET inventory_level = '15'
    WHERE column_id = '2'
    I want to create a trigger that execute before the insert. I want to insert the machine_id, the column_id, inventory_level into a change history table. The issue is he column_id and inventory_level fields are in the nested table. I tried to reference them as :NEW.column_id, but that didn't work.

    I too have had problems working with triggers & nested tables. This may help
    Imagine the scenario of a table that holds customer data that needs a specific record per user of the database to indicate if they can contact that customer.
    To solve this I created the following
    create type contact_type as object
    (username varchar2(30),
    can_mail number,
    can_phone number);
    create type contact_nt_type as table
    of contact_type;
    --table cust
    create table cust_table(
    custid number,
    custname varchar2(50),
    contact_nt contact_nt_type)
    nested table contact_nt store as contact_nt_tab;
    -- populate tables
    insert into cust_table
    values(1001,'Customer1',
    contact_nt_type(
    contact_type('SCOTT',1,0),
    contact_type('TIMS',0,1)));
    insert into cust_table
    values(1002,'Customer2',
    contact_nt_type(
    contact_type('SCOTT',0,0),
    contact_type('TIMS',0,0)));
    -- view cust_vu
    create or replace view cust_vu
    as
    select ct.custid, ct.custname, nt.can_mail, nt.can_phone
    from cust_table ct, table(ct.contact_nt) nt
    where nt.username = user;
    Now, if scott looks at the customer through the view he sees one set of contact details and if I look I see another. But if we try to update the view we get
    ORA-01733: virtual column not allowed here
    To solve this create an "instead of" trigger
    create or replace trigger cust_vu_update
    instead of update on cust_vu
    for each row
    begin
    -- update the parent table
    update cust_table
    set custname = :new.custname
    where custid = :old.custid;
    -- update the nested table
    update table(
    select contact_nt
    from cust_table
    where custid = :old.custid)
    set can_mail = :new.can_mail,
    can_phone = :new.can_phone
    where username = user;
    end;
    The documentation has a whole section on triggers & nested tables which, for me, did not solve any of my issues. Following the Create trigger syntax, specifically the dml_event_clause, caused me 0600 errors and my session was terminated!
    There may be better solutions but this one works for me.

  • OBIEE: Incorrectly defined logical table source doesn't contain mapping

    In OBIEE 10.1.3.2 I have a very simple thing but cannot get it to work. Hopefully someone can point out the mistake. I have the same schema on two different database that I want to compare data.
    The schema is simple. Table (dimension) A has two columns: id and name. Table (Fact) B has two columns: id and value. Table B.id is a foreign key to A. I imported two database schema into the physical layer and for each database, I built the foreign key relationship between table A and B. In the logical layer, I have two logic tables, one to represent A (Dimension) and the other B (Fact) with a logical join. Each logical table has two data sources. For the dimension tables, both id and name columns have two sources. For the fact table, the id has two sources and for the value, I created two separate columns, one called value1 and the other value2 with one from one database's B table's value column and the other from another database's B table's value. They then were made available at presentation layer.
    Now in the Anwser, I can build a query with id from dimension and value1 from fact; it displayed fine. Same with a query with id from dimension and value2 from fact, it displayed fine. However, if the query is id, value1 and value2, I got the following error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 15018] Incorrectly defined logical table source (for fact table B) does not contain mapping for [B.value1 [ ] , B.value2 [ ] ]. (HY000)
    Is there something I have to do additional to make both values appearing the same time.?
    Thanks for your help
    Ralph

    Hi, Siddhartha P
    I don't think I understand your information. I couldn't find connection pool at the business mapping layer. I only see it in the physical layer. Do you mean to do the mapping at the logical source table? That's only places I see any mappings and I don't see complex join there (only inner join, left outer, right outer and full outer) What mappings should I need to create between table B (fact table) of database 1 and table B (fact table) of database 2. I thought they don't have any relationship other than join through a dimension table which has columns that map to both table A (dimension table) of database 1 and 2. Then the logical fact table has 3 columns, one is id (to join to Dimension table) with two mappings (one to table B of database 1 and one to table B of database 2) and one column value1 which maps only to table B's value of database 1 and another column value2 maps to table B's value of database 2. That seems to be done correctly because I can pick column id and value1 or column id and value2 and have them displayed correctly but not all 3. I thought if it can display the two separately correctly, they should be able to display all 3. no?
    I am not getting any inconsistency error.
    There must be something I still don't understand. If you don't mind give me a little more direction, that would be great.
    Thanks
    Ralph

  • How to join PLSQL nested table with normal tables ?

    my requirement is to delete the rows in a normal oracle table in one statement, based on the values collected in a PL/SQL nested table which is filled by another program.
    In the following example, i need to delete the rows in
    the table c_journals where the columns branch_code and
    id are having values which exist in the PL/SQL
    nested table's columns a and b respectively
    declare
    type test_type IS RECORD (a VARCHAR2(20), b number(20));
    type test_table is table of test_type index by binary_integer;
    test_object test_table;
    cnt number;
    begin
    test_object(1).a := '1000';
    test_object(1).b := 1;
    test_object(2).a := '1006';
    test_object(2).b := 4;
    /* to be completed */
    delete c_journals where ....
    end;
    Is this possible in Oracle ? Iam using the version 9iR2
    Thanks in advance

    Both of the following delete statements should work. For the second the two types need to be created as database objects.
    declare
      type test_type IS RECORD (a VARCHAR2(20), b number(20));
      type test_table is table of test_type index by binary_integer;
      test_object test_table;  -- := test_table(test_type('1000',1), test_type('1006',4));
      cnt number;
    begin
      test_object(1).a := '1000';
      test_object(1).b := 1;
      test_object(2).a := '1006';
      test_object(2).b := 4;
      for i in test_object.first .. test_object.last loop
        delete from c_journals cj
        where test_object(i).a = cj.branch_code
         and test_object(i).b = cj.id;
      end loop;
    end;
    create or replace type test_type IS object (a VARCHAR2(20), b number(20));
    create or replace type test_table is table of test_type;
    declare
      test_object test_table := test_table(test_type('1000',1), test_type('1006',4));
      cnt number;
    begin
      delete from c_journals cj
      where exists (select 'x' from table(cast(test_object as test_table)) t
         where cj.branch_code = t.a and cj.id = t.b);
    end;
    /

Maybe you are looking for

  • Why doesn't "include/object/text from file" work?

    I want to include (link) text from other Word documents to a  main  Word document and I use "include/object/text from file" (Word function) It works fine when I do so in "H:", but doing exactly the same in the Sharepoint environement result in "nothi

  • HT201317 How can i get all the photos that are in my photo stream on my mac onto my new iPhone?

    How do I get the photos that are in my photo stream on my mac in iphoto onto my iphone 5?

  • Grid Control and Data Guard Setup

    Hi, I have 4 PCs on which I wish to test the following: 1. OEM Grid Control 10.2 - Console + Service + Agent 2. Data Guard feature with Broker 3. Standby Setup for a Primary Database. I will create the Primary DB on one Linux PC. Standby DB using Gri

  • List Error

    Why do i get UnSupported operation Exception for this code import java.util.*; public class ListDemo      public static void main(String[] args)           String[] st = {"a","b","c","d","b","b","f","g","h","rt","jk"};           List list = Arrays.asL

  • What is the latest IOS release supported for the AP 1231 G?

    I have a few AP1231G models running IOS 12.3(4)JA. What is the current version supported? Can these models support both WEP and WPA configurations concurrently?