Multitable Insert in OWB

Hi,
How can I create a mapping in OWB 11.2 for Multitable Insert?
Thank you.
-bzx

Multitable insert supported by OWB - use splitter operator dirrectly before target tables and don't forget to specify condition on output group,
but there is limitation on using additinal operators after spilltter - look this thread (for example if you add after splitter filter operator OWB stop generate multitable insert statement):
How to use Oracle 10G SQL features in OWB?
Regards,
Oleg

Similar Messages

  • DML ERROR LOGGING STATEMENT FAILS FOR MULTITABLE INSERT

    When I use a simple expression in my dml error logging statement for a multitable insert I get 'end of file on communication channel' on the compile(in all guis tested). It works fine without the simple expression for the multitable insert. The simple expression works ok with a single table insert.
    example:
    this works ok for single table insert and blows up on multitable inserts:
    LOG ERRORS INTO ERR$_INVOICE (TO_CHAR(SYSDATE,'YYYYMMDD HH:MI:SS')) REJECT LIMIT UNLIMITED;
    this works ok for both:
    LOG ERRORS INTO ERR$_CINVOICE REJECT LIMIT UNLIMITED;
    any ideas?

    No version number, no DDl, and no DML. No help is possible.
    Complete version information and a demo that people can run to duplicate your situation will increase the chance of getting help.
    I, for example, have no idea what you intend with the statement multitable insert. Is this a reference to INSERT ALL or INSERT FIRST or some other syntax?

  • Multitable insert problem with sequences

    Lets consider that I have the folowing configuration:
    create table t1 (col number, col2 varchar2(100));
    create table t2 (col number, col2 varchar2(100));
    create sequence s;
    I want to put the same sequence value into many tables with one multitable insert like:
    insert all
    into t1 (col, col2) values (a, 'dummy 1.1')
    into t2 (col, col2) values (a, 'dummy 1.1')
    into t2 (col, col2) values (a, 'dummy 1.2')
    into t2 (col, col2) values (a, 'dummy 1.3')
    select s.nextval as a from dual
    I know that the previous statement is "impossible" (acording oracle documentation http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm it is forbidden and issue "ORA-02287: sequence number not allowed here" exception)
    Do you have any ideas how to workaround this?

    SQL> insert all
      2  into t1 (col, col2) values (s.nextval, 'dummy 1.1')
      3  into t2 (col, col2) values (s.currval, 'dummy 1.1')
      4  into t2 (col, col2) values (s.currval, 'dummy 1.2')
      5  into t2 (col, col2) values (s.currval, 'dummy 1.3')
      6  select 1 from dual;
    4 rows created.
    SQL> select *from t1;
           COL COL2
             1 dummy 1.1
    1 row selected.
    SQL> select * from t2;
           COL COL2
             1 dummy 1.1
             1 dummy 1.2
             1 dummy 1.3
    3 rows selected.
    SQL> Nicolas.

  • What is the purpose of the subquery at the end of a multitable insert?

    I am learning about multitable inserts and am confused about the required subquery at the end of the insert statement. Take the following for example:
    INSERT ALL
    INTO t1 VALUES('value1')
    INTO t1 VALUES('value2')
    SELECT 1 FROM DUAL;
    What is the subquery "SELECT 1 FROM DUAL" for? The subquery must be there; and it can be any select statement, not just the simple one I have here. Does the subquery simply act as a termination for the inserts?

    >
    INSERT ALL
    INTO t1 VALUES('value1')
    INTO t1 VALUES('value2')
    SELECT 1 FROM DUAL;
    What is the subquery "SELECT 1 FROM DUAL" for?It is there for returning a single row from DUAL. Oracle evaluates the rows returned by the subquery and executes each of those "INTO" clauses once for each row returned by the subquery.
    Thus, each of the "INTO ... VALUES" clause is evaluated once for that 1 row returned by DUAL.
    Alternatively, you could write just one "INTO...VALUES" clause and return multiple rows in the subquery, thusly:
    SQL>
    SQL> drop table t1;
    Table dropped.
    SQL> create table t1 (x varchar2(10));
    Table created.
    SQL>
    insert all
    into t1 values (x)
    select 'value1' as x from dual union all
    select 'value2'      from dual union all
    select 'value3'      from dual;
    3 rows created.
    SQL>
    SQL> select * from t1;
    X
    value1
    value2
    value3
    SQL>
    SQL>
    ... Does the subquery simply act as a termination for the inserts?Well, no. The semi-colon character (";") or a forward slash character ("/") on the first column of the last line acts as the SQL terminator.
    The subquery is there because Oracle needs some data to evaluate, process as per the conditions and insert into (one or more) tables.
    Check the link to the documentation where it is explained in detail:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#SQLRF01604
    isotope

  • Can I get individual SQL%ROWCOUNT from a multitable insert?

    When using a multitable insert, is it possible to determine the SQL%ROWCOUNT of each of the tables involved in the insert?
    Oracle 10.2.0.3.

    I don't know of any built-in method.
    You might consider something similar to this example by Adrian Billington (albeit using MERGE).
    http://www.oracle-developer.net/display.php?id=220

  • Multitable insert

    Hi all
    I am doing restictions of multitable insert, but could not understand following two restrictions. Could anybody explain me with examples ??
    1. You cannot specify a table collection expression when performing a multitable insert.
    2. In a multitable insert, all if the insert_into_clauses cannot combine to specify more than 999 target columns.

    1) A table collection is a varray or nested table. In general you do not want to have columns in your tables that are collections in my opinion. If you do have such columns then you may not use a multi-table insert to populate those columns.
    2) You may insert into 400 columns of table A and 400 columns of table B -- that adds up to 800 target columns. You may not insert into 400 cols of A, 400 cols of B and 300 cols of C -- that adds up to 1100 target columns, which is more than the limit of 999 target columns.

  • Splitter operator doesnt use multi table inserts in OWB...very very urgent

    Hi,
    I am using OWB 9i to carry out tranformations. I want to copy the same seuence numbers to the two target tables.
    Scenario:
    I have a source table source_table, which is connected to a splitter and the splitter is used to dump the records in two target tables namely target1_table and target2_table. I have a sequence which is also an input to the splitter, so that I can have the same sequence number in the the two output groups of he splitter. I then map the sequence number from the two output groups to the two target tables expecting to have the same sequence number in the target tables. But when I see the generated code it creates two procedures and effectively inserts sequencing numbers in the target tables which are not consistent. Please help me so that I have the same sequencing numbers in the target tables which are consistent.
    Well the above example works in row based operating mode but not in set based mode. Please give me a valid explanation.
    OWB pdf says that splitter uses multi table inserts for multiple targets. After seeing the generated code for set based operations I dont agree to this.
    Its very urgent.
    thanks a lot in advance.
    -Sharat

    Hi Mark,
    You got me wrong, let me explain you the problem again.
    RDBMS oracle 9.2.0.4
    OWB 9.2.0.2.8
    I have three tables T1,T2 and T3.
    T1 is the source table and the remaining two tables T2 and T3 are target tables.
    Following are the contents of table T1 -
    SQl>select * from T1;
    DEPTNAME LOCATIO?N
    COMP PUNE
    MECH BOMBAY
    ELEC A.P
    Now I want to populate the two destination tables T2 and T3 with the records in T1.
    For this I am using splitter operator in OWB which is suppose to generate multi table inserts, but unfortunately its not doing so when I generate the SQL. There si no "insert all" command in the sql it generates.
    What I want is, when I populate T2 and T3 I use a sequence generator and I want the same sequences for T2 and T3 eg.
    SQl>select * from T2;
    NEXT_VAL DEPTNAME LOCATIO?N
    1 COMP PUNE
    2 MECH BOMBAY
    3 ELEC A.P
    SQl>select * from T3;
    NEXT_VAL DEPTNAME LOCATIO?N
    1 COMP PUNE
    2 MECH BOMBAY
    3 ELEC A.P
    I am able to achieve this when I set the operating mode to ROW BASED. I am not geting the same result when I set the operating mode to SET BASED.
    Help me....
    -Sharat

  • Delete/Insert in OWB 10g

    hai,
    I wanted to use delete/insert option so that i can selectively delete data and insert
    the new set of records.But what i found is that all the existing records get deleted
    ie selective delete is not happening. Can anyone pls let me know how this can be achieved with the help of delete/insert option(in operator properties of table)
    Thanks And Regards,
    Ashir

    There is a specific Warehouse Builder forum here:
    Warehouse Builder
    You can also post questions to this forum as this forum covers all BI products. To answer your question, I am not sure what you are trying to do. Are you trying to delete the object via "Control Center"? It should be possible to deploy the job as a delete job to remove the directory from your target/source database.
    Keith Laker
    Data Warehouse Solution Architect
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • How to use Oracle 10G SQL features in OWB?

    We are using OWB repository 10.2.0.1.0 and OWB client 10.2.0.1.31. The Oracle version is 10 G (10.2.0.3.0). OWB is installed on Linux.
    Oracle 10G SQL offers
    1) Inserting Into a Table with Error Logging
    2) conditional_insert_clause, Specify the conditional_insert_clause to perform a conditional multitable insert.
    Did anyone use above features in OWB10G mapping?
    How do we use them?
    Thanks in advance.
    RI

    Hi,
    Just a thought on the multi-table insert. OWB generates multitable insert when one source is mapped to multiple targets only on the condition that after the splitter there should not be any OWB operator that can change the cardinality of the row-set coming out of the splitter (like joiners, filters, aggregators etc.)..
    Regarding the link, I was wondering where I could find a decent documentation of the shadow table and the DML Error Logging through OWB .. Thanks for the link.
    OWB error messages are basically Oracle Error Messages when you consider the code that gets deployed. Other than that VLD errors are sometimes mysterious and hard to debug.. Hope someone can give us more details on how to handle such VLD errors :)
    HTH
    -AP

  • Insert or fetch  XML data so a sto insert in oracle table

    Hi
    I have the following XML structure .
    Kindly guide as I am new to using XML .
    Please provide the simplest and fastest way to extract or insert data from the below structure and insert in to oracle tables .
    <id>
    <id1> 123</id1>
    <fe>
    <fe1>1</fe1>
    <fe2>1</fe2>
    </fe>
    <a>
    <fe1>a1</fe1>
    <fe2>a2</fe2>
    </a>
    <newid>
    <atr>
    <atr1> 34</atr1>
    <atr2> 76 </atr2>
    </atr>
    <pr>
    <pr1> 34</pr1>
    <pr2> 34</pr2>
    </pr>
    </newid>
    </id >

    Use XMLTABLE to convert the xml and INSERT ALL to do a multitable insert.
    E.g.
    http://odieweblog.wordpress.com/2012/05/10/how-to-load-xml-data-into-multiple-tables/
    http://rwijk.blogspot.co.uk/2010/03/shredding-xml-into-multiple-tables-in.html

  • Can Multi-Table Insert KM be modified for updates ?

    Hi All,
    I am doing a POC on MTI KM.
    I would like to know if it is possible to modify/customize the MTI KM for updating the rows as well.
    Thanks & Regards,
    Prerna

    Yes you can . Refer my post on this
    http://bhabaniranjan.com/ikm-oracle-multitable-insert-with-filters/
    http://bhabaniranjan.com/router-transformation-in-odi/
    Thanks.

  • Multi table insert with error logging

    Hello,
    Can anyone please post an example of a multitable insert with an error logging clause?
    Thank you,

    Please assume that I check the documentation before asking a question in the forums. Well, apparently you had not.
    From docs in mention:
    multi_table_insert:
    { ALL insert_into_clause
          [ values_clause ] [error_logging_clause]
          [ insert_into_clause
            [ values_clause ] [error_logging_clause]
    | conditional_insert_clause
    subqueryRegards
    Peter

  • OWB use unwanted RTRIM in generated row based code

    Hi everybody,
    In a pretty straightforward mapping with simple DELETE and then INSERT OWB generate row based code. This would not bother me too much but in INSERT statement OWB use TRIM for all character columns immediately converting fields with spaces into NULL which I badly need to avoid. Does anybody know if this is OWB feature or is it configurable and can be avoided?
    I would appreciate any suggestions,
    Alex

    There are more than one way you can do this. Put it in the pre-mapping process, as described by you, use an expression, use a trasformation or use a temporary table to store constant values calculated on the fly. It all depends on what exacltly you want to do and on your environment details.
    Regards:
    Igor

  • Multiple inserts and upadates in tables through procedures

    how to do multiple inserts and updates of tables through procedures

    Hi,
    Not sure what you mean by 'multiple', without an example....
    You could perhaps use [merge | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm#i2091840] ?
    Or perhaps you could use [multitable inserts | http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9014.htm#i2125362] ?

  • Insert into two tables with a single query (same ID)

    Hello,
    I want to insert two tables at the same time ( with a single query) provided that both records get inserted with the same id. How do I do this?
    Table Movies
    id
    name
    Table Category
    movie_id
    cat_typea) Insert into first table, retrieve the id (may be by using my_sequence.currval and then insert into another table.
    issue: Makes three query to the db, I am also guessing that when multiple people try to insert there will be an issue, I might be wrong.
    I don't have any other idea.
    Greatly appreciated!

    Why don't use multitable insert ? It's available from 9i.
    A sequence.nextval will return the same value within the whole instruction
    so all records can be inserted with the same id.
    Look at this example:
    DROP TABLE A;
    DROP TABLE B;
    drop sequence a_seq;
    CREATE TABLE A(
      ID NUMBER,
      FIRSTNAME VARCHAR2(50)
    CREATE TABLE B AS
    SELECT id, firstname lastname FROM a;
    CREATE SEQUENCE a_seq
    START WITH 1;
    INSERT ALL
    INTO A(ID, FIRSTNAME) VALUES(A_SEQ.NEXTVAL, FNAME)
    INTO B(ID, LASTNAME) VALUES(A_SEQ.NEXTVAL, LNAME)
    SELECT 'fname ' || LEVEL FNAME, 'lname ' || LEVEL LNAME
    FROM DUAL
    CONNECT BY LEVEL < 10
    COMMIT;
    SELECT * FROM A;
    SELECT * FROM b;
    DROP TABLE A succeeded.
    DROP TABLE B succeeded.
    drop sequence a_seq succeeded.
    CREATE TABLE succeeded.
    CREATE TABLE succeeded.
    CREATE SEQUENCE succeeded.
    18 rows inserted
    commited
    ID                     FIRSTNAME                                         
    3                      fname 1                                           
    4                      fname 2                                           
    5                      fname 3                                           
    6                      fname 4                                           
    7                      fname 5                                           
    8                      fname 6                                           
    9                      fname 7                                           
    10                     fname 8                                           
    11                     fname 9                                           
    9 rows selected
    ID                     LASTNAME                                          
    3                      lname 1                                           
    4                      lname 2                                           
    5                      lname 3                                           
    6                      lname 4                                           
    7                      lname 5                                           
    8                      lname 6                                           
    9                      lname 7                                           
    10                     lname 8                                           
    11                     lname 9                                           
    9 rows selected

Maybe you are looking for

  • X1 Carbon Gen3 (2015) Chassis constantly clicks in and out of position

    It's been 1 week since I received my first Lenovo Laptop - X1 Carbon Gen3 and I'm very pleased with it so far. Since the beginning I noticed a 'clicking' sound produced when resting my palms on the keyboard to type, but couldn't figured out what it w

  • Queries related to MAM enhancements

    Hi, We require more fields than what is offered by standard MAM application. Please let me know the procedure to do so. My understanding is Step 1 : Add the fields in BADIs so that it can be pulled using standard BAPI wrappers. Step 2 :Regenerate the

  • 11.5.10.2:One time delivery address doesnot work as documented

    Hi All, I am trying to use one time delivery address feature. when I am creating requisition in iprocurement, on delivery information page , I am entering one time delivery address . However after I create a requisition and then buyer queries this re

  • QLA 3.5 broken since java update

    The latest java update from apple was installed on our G5 PPC last week. Since then our clients are unable to access the Quark License Administrator (ver 3.3, 3.5, 4.0). It worked fine before the update. The java prefs are set to use 1.4.2 first. We

  • Assigning material to class via ALE

    Hi experts, I am looking for a way to assign the materials to the class through ALE.  What message type can I use to transfer this information. Thanks for your help.