Multi-tables based blocks

Hello,
Since "FROM clause" based blocks are not well handled by Forms 6i (not editable, master-details relations restrictions), is there another way to base a block on several tables without using a "FROM clause" ?
Actually, blocks are based on one table (for editing), but along with information from another one. And these "foreign items" have to be in the same block !
Thanks for your help.

Yes you can base a block on a Join directly, e.g. the Query Datasource name property in the block has both tables named: emp,dept and the where clause defines the join
You have to decide which table will be the "master" and will receive the updates etc. You define this by setting the DML Data Target Name property to that table.
Set the Primary key property on the block to non-updatable and define which item is the actual key using the appropriate item property.
Finally for each field in the block set the appropriate source (prefixed with the table name e.g. emp.deptno) for each Item in the Column Name property and set the items that do no come from the master table as query only.
There is a detailed write up on how to do this in the June 2002 edition of the ODTUG Technical Journal. This available online to ODTUG members at:
http://www.odtug.com/members/briefcase/0602/mills.pdf

Similar Messages

  • Refreshing the data of a table based block

    Hi,
    Is there some function like refresh_block that I can use to reload the data a table block?
    Thanks,
    --Bassem                                                                                                                                                                                                                                        

    All you can do is to re-execute the query

  • Multi-table data block with update

    My data block is set up by joining 3 tables. Only 1 table is
    set up as updatable. The columns from the other 2 tables are
    set in property palette as not updatable. But when I try to
    update the data block row, I get: FRM-40501 ORACLE error:
    unable to reserve record for update or delete.
    I have tried using an updatable view in the data block and even
    wrote an INSTEAD TRIGGER for the update but I receive the same
    message.
    I appreciate your help.
    Thanks.

    you can try on-update trigger on block level to handle this
    problem.

  • How can I populate a table based block without it being the current block

    Any ideas??

    Ok, here are the key components:
    •     Tab Form
    •     ActiveX Control
    •     VSFlexGrid
    •     Additional Window / Canvas With Mirrored items
    The problem Is not that I can’t navigate to the block then execute a query, rather it is what takes place when it’s done that way.
    When I attempt to do it the conventional way what takes place is visually un-appealing to the user. What triggers the need to populate the block in question is when the user selects a value in the VSFlexGrid. When done the conventional way what takes place when the value is selected is... we do a go_block, since the block is on a different tab the form then brings up that tab, and then execute_query populates the block, then go_block to return to the block/tab containing the VSFlexGrid. Then I would have to come up with a way to interface with the VSFlexGrid and return the cursor focus to the previously selected item in the VSFlexGrid. What needs to happen is when the user selects a value in the VSFlexGrid, behind the scenes the block gets populated then when the user navigate to the block/tab in question the data is already there. To further complicate matters this data comes from two different tables and the data from the parent can only be updated where the data from the child can be inserted or updated. Now if the user wants to bring up the additional sub-window the tab which has the mirrored items is removed. While this window is open the user then returns to the VSFlexGrid navigates through the grid and depending on the item selected the values in the sub-window need to be repopulated.
    I guess if the block in question was on the same canvas / tab the conventional methods would be acceptable.
    Now that I have painted the picture if you have any ideas my ears are open.
    BTW… It looks like I have that last 10%. I am testing now and so far things are working as desired. When testing is SAT I will post the solution I have developed, maybe this will help Tony G. come up with a solution for his situation.

  • How to get a block of data from internal table based on a criteria

    Hi all,
              I have some records in the internal table t_int1. I want to retrieve some set records from that table and put them all in some other table, based on a single field which is not  a key. Can i use READ statement to achieve this.
    Could you please let me know any simple way of doin this.
    Regards,
    Vishnu

    I have some records in the internal table t_int1. I want to retrieve some set records from that table and put them all in some other table, based on a single field which is not a key. Can i use READ statement to achieve this.
    Could you please let me know any simple way of doin this.
    Answer :
    data:
    itab2 like standard table of  t_int1 with header line.
    Loop at t_int1.
    read table t_int1 with index 1.
    check ur condition----
    check each line and insert it ---work out the syntax for this
    IF t_int1-xyz = data1
    append  line of t_int1 to itab2. or try insert
    cnt = cnt + 1   -
    u will get no. of records added to next itab.
    else.
    cnt1 = cnt1 + 1 -
    u will get no. of records not added to next itab.
    endif.
    end loop.

  • VLD-1119: Unable to generate Multi-table Insert statement for some or all t

    Hi All -
    I have a map in OWB 10.2.0.4 which is ending with following error: -
    VLD-1119: Unable to generate Multi-table Insert statement for some or all targets.*
    Multi-table insert statement cannot be generated for some or all of the targets due to upstream graphs of those targets are not identical on "active operators" such as "join".*
    The map is created with following logic in mind. Let me know if you need more info. Any directions are highly appreciated and many thanks for your inputs in advance: -
    I have two source tables say T1 and T2. There are full outer joined in a joiner and output of this joined is passed to an expression to evaluate values of columns based on
    business logic i.e. If T1 is available than take T1.C1 else take T2.C1 so on.
    A flag is also evaluated in the expression because these intermediate results needs to be joined to third source table say T3 with different condition.
    Based on value taken a flag is being set in the expression which is used in a splitter to get results in three intermediate tables based on flag value evaluated earlier.
    These three intermediate tables are all truncate insert and these are unioned to fill a final target table.
    Visually it is something like this: -
    T1 -- T3 -- JOINER1
    | -->Join1 (FULL OUTER) --> Expression -->SPLITTER -- JOINER2 UNION --> Target Table
    | JOINER3
    T2 --
    Please suggest.

    I verified that their is a limitation with the splitter operator which will not let you generate a multi split having more than 999 columns in all.
    I had to use two separate splitters to achieve what I was trying to do.
    So the situation is now: -
    Siource -> Split -> Split 1 -> Insert into table -> Union1---------Final tableA
    Siource -> Split -> Split 2 -> Insert into table -> Union1

  • View links in multi table relations

    Is it advisable (in terms of performance e. g.), to create view links and view objects as local variables in multi table relations?
    examle: the jdev online help says to use
    such multi table relations like this:
    // A (one) -> B (many) -> C (many)
    ViewLink a2b = appMod.findViewLink("AtoB");
    ViewLink b2c = appMod.findViewLink("BtoC");
    ViewObject aV = a2b.getSource();
    ViewObject bV = a2b.getDestination();
    ViewObject cV = b2c.getDestination();
    while(aV.hasNext())
    Row aR = aV.next();
    while(bV.hasNext())
    Row bR = cV.next();
    while(cV.hasNext())
    Row cR = cV.next();
    I would rather keep everything concerning
    a, b, c together, especially when more
    tables (d, e, ...) are added, like this
    ViewLink a2b = appMod.findViewLink("AtoB");
    ViewObject aV = a2b.getSource();
    while(aV.hasNext())
    Row aR = aV.next();
    ViewLink b2c = appMod.findViewLink("BtoC");
    ViewObject bV = a2b.getDestination();
    while(bV.hasNext())
    Row bR = cV.next();
    ViewObject cV = b2c.getDestination();
    while(cV.hasNext())
    Row cR = cV.next();
    Is there anything to say against this approach (in term of performance for example). I am not sure to remeber,
    if this was the approach used in the HotelResevationSystem example.
    Thanks.
    Rx
    null

    For this to work you have to either build a view based on the entities from which you need attributes (joined by the FK) or build a ViewObject with the sql statement giving you all the attributes you need.
    The first case enables you the edit the attributes, the second gives you read only access to the attributes.
    What you try to do isn't a master-detail connection, you are doing a join of some tables.
    Timo

  • Any general tips on getting better performance out of multi table insert?

    I have been struggling with coding a multi table insert which is the first time I ever use one and my Oracle skills are pretty poor in general so now that the query is built and works fine I am sad to see its quite slow.
    I have checked numerous articles on optimizing but the things I try dont seem to get me much better performance.
    First let me describe my scenario to see if you agree that my performance is slow...
    its an insert all command, which ends up inserting into 5 separate tables, conditionally (at least 4 inserts, sometimes 5 but the fifth is the smallest table). Some stats on these tables as follows:
    Source table: 5.3M rows, ~150 columns wide. Parallel degree 4. everything else default.
    Target table 1: 0 rows, 27 columns wide. Parallel 4. everything else default.
    Target table 2: 0 rows, 63 columns wide. Parallel 4. default.
    Target table 3: 0 rows, 33 columns wide. Parallel 4. default.
    Target table 4: 0 rows, 9 columns wide. Parallel 4. default.
    Target table 5: 0 rows, 13 columns wide. Parallel 4. default.
    The parallelism is just about the only customization I myself have done. Why 4? I dont know it's pretty arbitrary to be honest.
    Indexes?
    Table 1 has 3 index + PK.
    Table 2 has 0 index + FK + PK.
    Table 3 has 4 index + FK + PK
    Table 4 has 3 index + FK + PK
    Table 5 has 4 index + FK + PK
    None of the indexes are anything crazy, maybe 3 or 4 of all of them are on multiple columns, 2-3 max. The rest are on single columns.
    The query itself looks something like this:
    insert /*+ append */ all
    when 1=1 then
    into table1 (...) values (...)
    into table2 (...) values (...)
    when a=b then
    into table3 (...) values (...)
    when a=c then
    into table3 (...) values (...)
    when p=q then
    into table4(...) values (...)
    when x=y then
    into table5(...) values (...)
    select .... from source_table
    Hints I tried are with append, without append, and parallel (though adding parallel seemed to make the query behave in serial, according to my session browser).
    Now for the performance:
    It does about 8,000 rows per minute on table1. So that means it should also have that much in table2, table3 and table4, and then a subset of that in table5.
    Does that seem normal or am I expecting too much?
    I find articles talking about millions of rows per minute... Obviously i dont think I can achieve that much... but maybe 30k or so on each table is a reasonable goal?
    If it seems my performance is slow, what else do you think I should try? Is there any information I may try to get to see if maybe its a poorly configured database for this?
    P.S. Is it possible I can run this so that it commits every x rows or something? I had the heartbreaking event of a network issue giving me this sudden "ora-25402: transaction must roll back" after it was running for 3.5 hours. So I lost all the progress it made... have to start over. plus i wonder if the sheer amount of data being queued for commit/rollback is causing some of the problem?
    Edited by: trant on Jun 27, 2011 9:29 PM

    Looks like there are about 54 sessions on my database, 7 of the sessions belong to me (2 taken by TOAD and 4 by my parallel slave sessions and 1 by the master of those 4)
    In v$session_event there are 546 rows, if i filter it to the SIDs of my current session and order my micro_wait_time desc:
    510     events in waitclass Other     30670     9161     329759     10.75     196     3297590639     1736664284     1893977003     0     Other
    512     events in waitclass Other     32428     10920     329728     10.17     196     3297276553     1736664284     1893977003     0     Other
    243     events in waitclass Other     21513     5     329594     15.32     196     3295935977     1736664284     1893977003     0     Other
    223     events in waitclass Other     21570     52     329590     15.28     196     3295898897     1736664284     1893977003     0     Other
    241     row cache lock     1273669     0     42137     0.03     267     421374408     1714089451     3875070507     4     Concurrency
    241     events in waitclass Other     614793     0     34266     0.06     12     342660764     1736664284     1893977003     0     Other
    241     db file sequential read     13323     0     3948     0.3     13     39475015     2652584166     1740759767     8     User I/O
    241     SQL*Net message from client     7     0     1608     229.65     1566     16075283     1421975091     2723168908     6     Idle
    241     log file switch completion     83     0     459     5.54     73     4594763     3834950329     3290255840     2     Configuration
    241     gc current grant 2-way     5023     0     159     0.03     0     1591377     2685450749     3871361733     11     Cluster
    241     os thread startup     4     0     55     13.82     26     552895     86156091     3875070507     4     Concurrency
    241     enq: HW - contention     574     0     38     0.07     0     378395     1645217925     3290255840     2     Configuration
    512     PX Deq: Execution Msg     3     0     28     9.45     28     283374     98582416     2723168908     6     Idle
    243     PX Deq: Execution Msg     3     0     27     9.1     27     272983     98582416     2723168908     6     Idle
    223     PX Deq: Execution Msg     3     0     25     8.26     24     247673     98582416     2723168908     6     Idle
    510     PX Deq: Execution Msg     3     0     24     7.86     23     235777     98582416     2723168908     6     Idle
    243     PX Deq Credit: need buffer     1     0     17     17.2     17     171964     2267953574     2723168908     6     Idle
    223     PX Deq Credit: need buffer     1     0     16     15.92     16     159230     2267953574     2723168908     6     Idle
    512     PX Deq Credit: need buffer     1     0     16     15.84     16     158420     2267953574     2723168908     6     Idle
    510     direct path read     360     0     15     0.04     4     153411     3926164927     1740759767     8     User I/O
    243     direct path read     352     0     13     0.04     6     134188     3926164927     1740759767     8     User I/O
    223     direct path read     359     0     13     0.04     5     129859     3926164927     1740759767     8     User I/O
    241     PX Deq: Execute Reply     6     0     13     2.12     10     127246     2599037852     2723168908     6     Idle
    510     PX Deq Credit: need buffer     1     0     12     12.28     12     122777     2267953574     2723168908     6     Idle
    512     direct path read     351     0     12     0.03     5     121579     3926164927     1740759767     8     User I/O
    241     PX Deq: Parse Reply     7     0     9     1.28     6     89348     4255662421     2723168908     6     Idle
    241     SQL*Net break/reset to client     2     0     6     2.91     6     58253     1963888671     4217450380     1     Application
    241     log file sync     1     0     5     5.14     5     51417     1328744198     3386400367     5     Commit
    510     cursor: pin S wait on X     3     2     2     0.83     1     24922     1729366244     3875070507     4     Concurrency
    512     cursor: pin S wait on X     2     2     2     1.07     1     21407     1729366244     3875070507     4     Concurrency
    243     cursor: pin S wait on X     2     2     2     1.06     1     21251     1729366244     3875070507     4     Concurrency
    241     library cache lock     29     0     1     0.05     0     13228     916468430     3875070507     4     Concurrency
    241     PX Deq: Join ACK     4     0     0     0.07     0     2789     4205438796     2723168908     6     Idle
    241     SQL*Net more data from client     6     0     0     0.04     0     2474     3530226808     2000153315     7     Network
    241     gc current block 2-way     5     0     0     0.04     0     2090     111015833     3871361733     11     Cluster
    241     enq: KO - fast object checkpoint     4     0     0     0.04     0     1735     4205197519     4217450380     1     Application
    241     gc current grant busy     4     0     0     0.03     0     1337     2277737081     3871361733     11     Cluster
    241     gc cr block 2-way     1     0     0     0.06     0     586     737661873     3871361733     11     Cluster
    223     db file sequential read     1     0     0     0.05     0     461     2652584166     1740759767     8     User I/O
    223     gc current block 2-way     1     0     0     0.05     0     452     111015833     3871361733     11     Cluster
    241     latch: row cache objects     2     0     0     0.02     0     434     1117386924     3875070507     4     Concurrency
    241     enq: TM - contention     1     0     0     0.04     0     379     668627480     4217450380     1     Application
    512     PX Deq: Msg Fragment     4     0     0     0.01     0     269     77145095     2723168908     6     Idle
    241     latch: library cache     3     0     0     0.01     0     243     589947255     3875070507     4     Concurrency
    510     PX Deq: Msg Fragment     3     0     0     0.01     0     215     77145095     2723168908     6     Idle
    223     PX Deq: Msg Fragment     4     0     0     0     0     145     77145095     2723168908     6     Idle
    241     buffer busy waits     1     0     0     0.01     0     142     2161531084     3875070507     4     Concurrency
    243     PX Deq: Msg Fragment     2     0     0     0     0     84     77145095     2723168908     6     Idle
    241     latch: cache buffers chains     4     0     0     0     0     73     2779959231     3875070507     4     Concurrency
    241     SQL*Net message to client     7     0     0     0     0     51     2067390145     2000153315     7     Network
    (yikes, is there a way to wrap that in equivalent of other forums' tag?)
    v$session_wait;
    223     835     PX Deq Credit: send blkd     sleeptime/senderid     268697599     000000001003FFFF     passes     1     0000000000000001     qref     0     00     1893977003     0     Other     0     10     WAITING
    241     22819     row cache lock     cache id     13     000000000000000D     mode     0     00     request     5     0000000000000005     3875070507     4     Concurrency     -1     0     WAITED SHORT TIME
    243     747     PX Deq Credit: send blkd     sleeptime/senderid     268697599     000000001003FFFF     passes     1     0000000000000001     qref     0     00     1893977003     0     Other     0     7     WAITING
    510     10729     PX Deq Credit: send blkd     sleeptime/senderid     268697599     000000001003FFFF     passes     1     0000000000000001     qref     0     00     1893977003     0     Other     0     2     WAITING
    512     12718     PX Deq Credit: send blkd     sleeptime/senderid     268697599     000000001003FFFF     passes     1     0000000000000001     qref     0     00     1893977003     0     Other     0     4     WAITING
    v$sess_io:
    223     0     5779     5741     0     0
    241     38773810     2544298     15107     27274891     0
    243     0     5702     5688     0     0
    510     0     5729     5724     0     0
    512     0     5682     5678     0     0                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Multi table insert

    Hello boys,
    I would like to do an insert into 3 tables:
    insert into t1
    if found insert into t2
    if not found insert into t3.
    So 2 out of 3 tables will end up with data.
    I would like to do it in 1 multi table insert.
    I can't use selects from the destination tables cause they are in the terabytes. I tried a number of combinations of primary keys error logging tables ("log errors reject limit unlimited") but without any success.
    Any ideas?

    Hello Exor,
    You said,
    insert into t1
    if found insert into t2
    if not found insert into t3.
    What is found condition? What are you checking and have you looked into insert all clause if that what you needed. Remember you can have complex join in your select and insert into 3 or 4 table based your "found" condition. This might be fastest way to move data into 3 tables instead of using cursor or bulk collect.
      INSERT ALL
       WHEN order_total < 1000000 THEN
          INTO small_orders
       WHEN order_total > 1000000 AND order_total < 2000000 THEN
          INTO medium_orders
       WHEN order_total > 2000000 THEN
          INTO large_orders
       SELECT order_id, order_total, sales_rep_id, customer_id
          FROM orders;Regards

  • PDF Table action block is repeating first row in each page.

    Hi All,
    There is a strange problem in PDF Table action block. I am paasing one xml variable in the pdf table action block. But when it creates the final pdf  - I can see the very first row of the xml is getting repeated as first row of each page along with the header.
    Is there any solution - not to reapeat the first row of the xml in each page ?
    Thanks in advance for your response.
    Soumen

    Hi Michael,
    Installation of PDF Action is done based on this link-
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1109054
    MII Version - 12.0.7 Build(20)
    version 1.4.5. of
    the third-party iText.jar and iTextAsian.jar, from
    http://www.lowagie.com/iText/download.html
    Thanks,
    Soumen

  • Group data with multi tables in report.rdlc

    I have a report.rdlc which contains 8 tables and every table reads from different dataset which also reads from different procedure, these tables finally view data for one employee, and this was working correctly. Now I need to view the same report but
    for multi employees, I don't know how to make one group(employee number) for the 8 tables although they have different datasets and procedures
    this is a Pressing problem
    please help me

    Hi nermo,
    According to your description, you want to display 8 tables in detail rows group on employee number. So it will have 8 tables for each employee. Right?
    In this scenario, we can create a dataset whick only return the employee number and put the employee number into a table. Put the 8 tables into 8 separated reports, then add these reports as subreports into detail row. It will display these data even they
    are from 8 different dataset. If you want to filter the records in those tables based on the employee number. You need to have the Employee parameter in both main report and subreports and pass the parameter to run subreports. We have tested in this scenario
    in our local environment. Here are screenshots for your reference:
    Reference:
    SSRS Subreport Parameter Passing Issue
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Help with multi-table mapping for one-to-many object inheritance

    Hi,
    I have posted on here before regarding this (Toplink mapping for one-to-many object inheritance but I am still having problems mapping my object model to my schema.
    Object model
    The Person and Organisation objects contain base information and have the primary keys person_id and organisation_id. It is important that there is no duplication of person and organisation records, no matter how many times they are saved in different roles.
    There are two types of licenceholder in the problem domain, and the ILicenceHolder interface defines information and methods that are common to both. The PersonalLicenceHolder object represents one of these types of licenceholder, and is always a person, so this class extends Person and implements ILicenceHolder.
    The additional information and methods that are required by the second type of licenceholder are defined in the interface IPremisesLicenceHolder, which extends ILicenceHolder. Premises licence holders can either be people or organisations, so I have two objects to represent these - PremisesLicenceHolderPerson which implements IPremisesLicenceHolder and extends Person, and PremisesLicenceHolderOrganisation which implements IPremisesLicenceHolder and extends Organisation.
    The model is further complicated by the fact that any single Person may be both a PersonalLicenceHolder and a PremisesLicenceHolderPerson, and may be so several times over. In this case, the same basic Person information needs to be linked to several different sets of licenceholder information. In the same way, any single Organisation may be a PremisesLicenceHolderOrganisation several times over.
    Sorry this is complicated!
    Schema
    I have Person and Organisation tables containing the basic information with the primary keys person_id and organisation_id.
    I have tried to follow Donald Smith's advice and have created a Role table to record the specialised information for the different types of licence holder. I want the foreign keys in this table to be licenceholder_id and licence_id. Licenceholder_id will reference either organisation_id or person_id, and licence_id will reference the primary key of the Licence table to link the licenceholder to the licence. Because I am struggling with the mapping, I have changed licenceholder_id to person_id in an attempt to get it working with the Person object before I try the Organisation.
    Then, when a new licenceholder is added, if the person/organisation is already in the database, a new record is created in the Role table linking the existing person/organisation to the existing licence rather than duplicating the person/organisation information.
    Mapping
    I am trying to use the toplink mapping workbench to map my PremisesLicenceHolderPerson object to my schema. I have mapped all inherited attributes to superclass (Person). The primary table that the attributes are mapped to is Person, and I have used the multi-table info tab to add Roles as an additional table and map the remaining attributes to that.
    I have created the references PERSON_ROLES which maps person.person_id to roles.person_id, ROLES_PERSON which maps roles.person_id to person.person_id and ROLES_LICENCE which maps roles.licence_id to licence.licence_id.
    I think I have put in all the relationships, but I cannot get rid of the error message "The following primary key fields are unmapped: PERSON_ID".
    Please can somebody tell me how to map this properly?
    Thank you.

    I'm not positive about your mappings, but it looks like the Person object should really have a 1:M or M:M mapping to the Licenceholder table. This then means that your object model should be similar, in that Person object could have many Licenses, instead of being LicenceHolders. From the looks of it, you have it set up from the LicenceHolder perspective. What could be done instead if a LicenceHolder could have a 1:1 reference to a person data object, rather than actually be a Person. This would allow the person data to be easily shared among licences.
    LicenceHolder1 has an entry in the LicenceHolder table and Person table. LicenceHolder2 also has entries in these tables, but uses the same entry in the Person table- essentially it is the same person/person_ID. If both are new objects, TopLink would try to insert the same person object into the Person table twice. I'm not sure how you have gotten around or are planning to get around this problem.
    Since you are using inheritance, it means that LicenceHolder needs a writable mapping to the person.person_id field- most commonly done through a direct to field mapping. From the description, it looks like roles.person_id is a foreign key in the multiple table mapping, meaning it would be set based on the value in the person.person_id field, but the person.person_id isn't actually mapped in the object. Check to make sure that the ID attribute LicenceHolder is inheriting from person hasn't been remapped in the LicenceHolder descriptor to a different field.
    Best Regards,
    Chris

  • 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

  • Procedure based blocks - error using Forms 6/8i/NT

    A simple form with a procedure-based block fails with the Lock procedure, giving an ORA-03114 error. I believe there is some known bug with procedure-based blocks using Forms 6 and Oracle 8i over NT. The Query procedure (based on a ref cursor) works fine, but the Lock, Insert and Delete triggers (and presumably the Update trigger too - without a Lock I can't get that far) return the error (these are based on a table).
    Does anyone know if this is a known bug? The same form has run successfully using Forms 6/Oracle 7.3/VMS.

    It's a known bug and the patch is available through MetaLink.

  • Join relation with two sotred procedure based blocks

    Hi,
    I am working on a form with two DB stored procedure based blocks.
    It is like:
    BLOCK1: based on blk1_select(id1) (master)
    BLOCK2: based on blk2_select(id1) (details)
    The join condition is:
    BLOCK2.id1 = BLOCK1.id1 and BLOCK2.id2 = BLOCK1.id2
    here id1 is the parameter and id2 is the cursor item.
    The behavior that I expect is that when I do next_record in BLOCK1, the BLOCK2 with move to next record corresponding to id2, but this time BLOCK2 records stay as the same.
    The behavior is good for regular table base blocks and there must be something that I am not aware of.
    This FORM does query only, no insert, update and delete.
    Please help. Any suggestions are greatly appreciated.
    Thank.
    Jimmy
    Edited by: WJH on Feb 25, 2010 3:28 PM
    Edited by: WJH on Feb 25, 2010 3:44 PM
    Edited by: WJH on Feb 25, 2010 4:08 PM
    This FORM does query only, no insert, update and delete.

    If you have access to Metalink check out Document ID: 124650.1 (Master/Detail Relationship based on Stored Procedures).
    Hope this helps.
    Craig...
    If a response is helpful or correct, please mark it accordingly

Maybe you are looking for