11g: treeTable child record selection

Hi,
I have a (pseudo) model, where entity A is self-referenced and also parent of B, so:
A 1 - * A
A 1 - * B
I'd like to load all As into treeTable, which is not a ploblem. When a record in the treeTable is selected, I need to load detail Bs in a seperate panelFormLayout.
The problem is, the panelFormLayout only reloads when one of the first level As is selected, but selection of child As has no effect.
Setting target data source to the same iterator solves the problem with selection, but introduces another one: selected detail is appended to the end of the tree table.
Any ideas how to do it properly?
Thanks

No matter what I tried I just couldn't get it work with business components, so I've taken another approach:
I create a TreeModel copy of data in A dataView and bind treeView to generated TreeModel. I had to write some snchronization code (currentRow, selection etc.), but so far it seems to work.

Similar Messages

  • ADF,how to delete parent record and related child record without manual cod

    Hi All,
    I'm using 11g adf.
    I have one parent table PAR and two child table CHD1 , CHD2 respectively.
    I'm inserting values in three tables , making a form having add , delete and edit buttons.
    Issue when i want to delete a record from PAR table , it gives child table record exists . i have did manual coding to delete the child records with related to the selected parent table PAR.
    Is there any process in ADF to delete the child records with respective selected parent record with out manual coding.
    thanks in advance.

    http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcentities.htm#BABHFJFJ
    John

  • Deletion of child records linked to parent records to be deleted etc..

    'Combined with WHEN OTHERS, SQLCODE provides a way for you to handle different, specific exceptions without having to use EXCEPTION_INIT pragma. In the next example, I trap two parent child exceptions, -2292 and -2291, and, then take an action appropriate to each situation:
    PROCEDURE delete_company (company_id_in IN NUMBER)
    IS
    BEGIN
    DELETE FROM company where company_id = company_id_in;
    EXCEPTION
    WHEN OTHERS THEN
    DECLARE
    error_code NUMBER := SQLCODE;
    error_msg VARCHAR2(512) := SQLERM;
    BEGIN
    IF error_code = -2292 THEN
    /*Child records found. Delete these too */
    DELETE FROM employee WHERE company_id = company_id_in;
    /* Now delete parent again */
    DELETE FROM company WHERE company_id = company_id_in;
    ELSIF error_code = -2291 THEN
    /* Parent key not found */
    DBMS_OUTPUT_PUT_LINE('Invalid company id' || TO_CHAR(company_id_in));
    ELSE
    /* This is like a WHEN OTHERS inside a WHEN OTHERS */
    DBMS_OUTPUT_PUT_LINE('Error deleting company, error: ' || error_msg
    END IF;
    END;
    END delete_company;
    Sourced from Oracle PL/SQL Programming (3rd edition) P.143
    1. Are error_code and error_msg assigned automatically or do I have to include assignments? If yes, how?
    2. Where do I get a list of commonly caught Oracle error codes and similar code snippets used for business logic?
    3. How would you deal with the situation where you detect a parent while you are deleting a child record? Just warn the user and log it hoping the DBA will review the logs?
    4. I work within a project where I could not query any parent-child relationships, using, amongst other queries the following query, and, this means that the programming team might not be creating these relationships within the database (Oracle 11g).
    What are the technical risks?
    Could I be omitting something, because it seems quite incredible to me that parent-child relationships are not in place?
    SELECT a.table_name,
    a.column_name,
    a.constraint_name,
    c.owner
    FROM ALL_CONS_COLUMNS A, ALL_CONSTRAINTS C
    where A.CONSTRAINT_NAME = C.CONSTRAINT_NAME
    and a.table_name=:TableName
    and C.CONSTRAINT_TYPE = 'R'
    Sourced from http://stackoverflow.com/questions/1729996/list-of-foreign-keys-and-the-tables-they-reference

    This is bad code, very very bad code. Throw it away and start with a clear idea of what you want to do.
    Why is this code very very bad? Because it uses WHEN OTHERS not followed by a RAISE.
    Why is this code bad code? Because it uses one WHEN clause instead of several.
    Here is an example for handling multiple exceptions:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/errors.htm#BABFBHGA
    If your error code does not have a predefined name, define the name yourself:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/errors.htm#BABIIEFC
    If you keep the WHEN OTHERS at the end, be sure to add RAISE so the exception still exists. If you don't, Oracle will not do the automatic rollback it should be doing.
    To answer your question about parent-child relationships, it is very important to have them. They stop you deleting a parent that has children, but they do not stop you from deleting children.

  • Open dialog box window with checkboxes for each child record - Please Help

    Hello Everybody
    I have a 10g form with master record and 20 child records. In the child record form, currently there is a “Notes” Editor, which pops up when user click the “Edit” button. In the “Notes” editor, user enters remarks if anything is missing. For example, typical remarks will be: Statement is missing, LOC paper is missing etc.
    Now, I would like to replace “Notes” editor with a dialog box. In the dialog box , I would like to add checkboxes with values “Statement is missing” and “LOC paper is missing” etc. along with “Notes” field. The user can select checkboxes. The value of the checkboxes should go in the “Notes” field with the ability to edit it. This way, user doesn’t need to type the most common notes every time.
    I have created a “NewNotes” dialog box with checkboxes and multiline text Item. It is pops up when I click on the button. I have also created to WHEN_CHECKBOC_CHANGED trigger for each checkboxes so that the its value will go in a multiline text item.
    But, I am not sure how I can link “NewNotes” dialog box to the each record in child record block. I would really appreciate it if anybody could give me some idea.
    Thanks,

    if i understand correctly you have a note item (based on table) on every child record? when you open the dialog box: how do you put data from notes to dialog box? in the same way as you can write it back ...

  • Inserting parent /child records from a xml file ...

    XML file pasted below:
    I have loaded the xml file into a table called xml_demo which has a column xml_data of type xmltype.
    The select for parent record is as follows and it works:
    INSERT INTO balit_submissions (balitdoc, documentversion, datetime_from,job_id, status,creation_datetime)
    (SELECT 'MOL'
    ,to_number(extract(x.xml_data,'/MolDocument/DocumentVersion/@v'))
    ,to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    'yyyy-mm-dd"T"hh24:mi')
    ,123456
    ,'CREATED',
    NULL
    FROM xml_DEMO x WHERE
    existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1)
    Having problem creating child records. From this file I expect to create 3 records.
    insert into balit_energy_blocks
    SO_ID,
    DATETIME_FROM,
    DIRECTION,
    BLOCK_NUMBER,
    ENERGY,
    LAST_SUBMIT_DATETIME,
    PRICE_POUNDS,
    PRICE_EUROS,
    BALIT_REF,
    STATUS,
    LAST_EDIT_DATETIME,
    MOL_REASON,
    ACQUIRING_SO_AREA)
    (SELECT 'RTE'
    ,to_date(substr(extract(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),
    'yyyy-mm-dd"T"hh24:mi')
    ,DECODE(extract(x.xml_data,'/MolDocument/MolTimeSeries/Direction/@v'),'AO1','Up','Down')
    ,to_number(substr(extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))
    ,to_number(extract(x.xml_data,'/MolDocument/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
    ,sysdate
    ,null -- price pounds
    ,null -- price euro
    ,extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v')
    ,'SUBMITTED'
    ,'A96'
    ,NULL -- acquiring area
    ,sysdate
    FROM xml_DEMO x WHERE
    existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1)
    For example, there are 3 ContractIdentification tags. Example of 1:
    <ContractIdentification v="RTE_20100331_1500_16"/>
    I was expecting this select to pluck the last number from this string. In this case 16.
    The select was:
    to_number(substr(extract(x.xml_data,'/MolDocument/MolTimeSeries/ContractIdentification/@v'),19))
    The result I got was:
    16RTE_20100331_1500_20NG_20100331_1500_6
    All contractident values are concatnated and returns from position 19 onwards.
    Can anyone help me to extract the last number from each ContractIdentification tag value and to create the 3 records
    Thanks
    James Sathiaraj
    <?xml version="1.0" encoding="UTF-8"?>
    <MolDocument DtdVersion="3" DtdRelease="0">
    <DocumentIdentification v="MOL_20100331_1500_1600"/>
    <DocumentVersion v="1"/>
    <DocumentType v="A43"/>
    <SenderIdentification codingScheme="A01" v="17X100Z100Z0001H"/>
    <SenderRole v="A35"/>
    <ReceiverIdentification codingScheme="A01" v="10XFR-RTE------Q"/>
    <ReceiverRole v="A04"/>
    <CreationDateTime v="2010-03-31T14:10:00Z"/>
    <ValidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Domain codingScheme="A01" v="10YDOM-1001A001A"/>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_16"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.45"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    <MolTimeSeries>
    <ContractIdentification v="RTE_20100331_1500_20"/>
    <ResourceProvider codingScheme="A01" v="10XFR-RTE------Q"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YFR-RTE------C"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A02"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="50.48"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    <MolTimeSeries>
    <ContractIdentification v="NG_20100331_1500_6"/>
    <ResourceProvider codingScheme="A01" v="10X1001A1001A515"/>
    <AcquiringArea codingScheme="A01" v="17Y100Z100Z00013"/>
    <ConnectingArea codingScheme="A01" v="10YGB----------A"/>
    <AuctionIdentification v="AUCTION_20100331_1500_1600"/>
    <BusinessType v="A10"/>
    <BidTimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <MeasureUnitQuantity v="MAW"/>
    <Currency v="EUR"/>
    <MeasureUnitPrice v="MWH"/>
    <Direction v="A01"/>
    <MinimumActivationQuantity v="50"/>
    <Status v="A06"/>
    <Period>
    <TimeInterval v="2010-03-31T15:00Z/2010-03-31T16:00Z"/>
    <Resolution v="PT60M"/>
    <Interval>
    <Pos v="1"/>
    <Qty v="50"/>
    <EnergyPrice v="17.0"/>
    </Interval>
    </Period>
    </MolTimeSeries>
    </MolDocument>

    Hi,
    The result I got was:
    16RTE_20100331_1500_20NG_20100331_1500_6In the query you tried, you access a single record so you can't expect to get three rows "magically". The EXTRACT function just works as expected, it extracts the requested nodes, but the result is still an XML fragment (a scalar value).
    In order to achieve your goal, you have to break the MolTimeSeries sequence into relational rows.
    Two similar solutions are possible, XMLTable (10gR2 and up) or Table/XMLSequence.
    In your other post you mentioned db version 10.1, so I guess we'll go with XMLSequence :
    SELECT 'RTE'
           ,to_date(substr(extractvalue(x.xml_data,'/MolDocument/ValidTimeInterval/@v'),1,16),'yyyy-mm-dd"T"hh24:mi')
           ,decode(extractvalue(x2.column_value,'/MolTimeSeries/Direction/@v'),'A01','Up','Down')
           ,to_number(regexp_substr(extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v'),'\d+$'))
           ,to_number(extractvalue(x2.column_value,'/MolTimeSeries/Period/Interval/EnergyPrice/@v'))
           ,sysdate
           ,null
           ,null
           ,extractvalue(x2.column_value,'/MolTimeSeries/ContractIdentification/@v')
           ,'SUBMITTED'
           ,'A96'
           ,null
           ,sysdate
    FROM xml_demo x,
         table(
           xmlsequence(
             extract(x.xml_data, '/MolDocument/MolTimeSeries')
         ) x2
    WHERE existsnode(x.xml_data,'/MolDocument/DocumentIdentification[@v="MOL_20100331_1500_1600"]') = 1;Please also note the use of REGEXP_SUBSTR instead of the regular SUBSTR because it didn't work for "NG_20100331_1500_6".
    Hope that helps.
    Edited by: odie_63 on 24 juin 2010 21:18 - added regexp comment

  • How to delete parent and child records together ?

    Hi,
    I'm using Jdeveloper 11.1.2.2
    I want to delete a row from a table but it is showing: Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-02292: integrity constraint (TABLE1_TL_FK1) violated - child record found.So how can I delete a Child row and table row in one method ?
    I cannot access the child's VO because it is not added to the AM.
    Thanks,
    Nigel.

    John, as usually, is right with the pointer to the documentation he pasted. Just to make sure you read it carefully, let me hoghlight an important point here:
    "If the option is selected, then the composed entities do not perform the DELETE statement *on the assumption that the database ON DELETE CASCADE constraint will handle the deletion of the corresponding rows*."
    So make sure the database is setup for cascade delete as otherwise you still will not succeed
    Frank

  • How to find child records given a parent key

    I have a master table which is parent for several child tables. I want to display a button to delete a record in master table. I would prefer show this button conditionally so when a master record has child records, I don't show delete button and no error is raised.
    Of course I could scan every child table to find out child records, but I think must exist a generic method
    How can I find out if a given parent key has child records?
    Thanks in advance
    Oscar
    P.S: I'm using 10gR2
    Edited by: user10712087 on 13/01/2009 02:31 PM

    Oscar
    There's no magic/generic way to check that a master row has no associated detail rows. As Pavan says, you have to decide which detail tables to check, and check them using SQL as usual. (Actually, there is a quick way - you delete the row and if there are any child rows with foreign keys that don't cascade, the delete will fail; but of course you can't use this in case the delete succeeds but the user never wants to press the button).
    One addition to Pavan's answer: DO NOT under any circumstances count all the records in every detail table. All you want to know is, is there at least 1 detail record in at least 1 of the tables. No need to count 100 or 1000 rows...
    You can do this like this in your PL/SQL
    FUNCTION check_children(p_master_id IN INTEGER) RETURN BOOLEAN
    IS
      CURSOR c_child1  IS
      select 1 from child_table_1 where master_id = check_children.p_master_id;
      CURSOR c_child2 IS
      select 1 from child_table_2 where master_id = check_children.p_master_id;
      -- etc for all child tables
    l_rec_present integer := null;
    BEGIN
        OPEN c_child_1;
        FETCH c_child_1 INTO l_rec_present;
        CLOSE c_child_1;
        IF l_rec_present i= 1 THEN
            -- there is a child in child_table_1
            RETURN TRUE;
        END IF;
        OPEN c_child_2;
        FETCH c_child_2 INTO l_rec_present;
        CLOSE c_child_2;
        IF l_rec_present i= 1 THEN
            RETURN TRUE;
        END IF;
    -- etc for each child; finally, if no child found:
       RETURN FALSE;
    END;This makes sure that (1) you stop as soon as you find any child, and (2) you don't get any NO_DATA_FOUND or TOO_MANY_ROWS exceptions raised.
    HTH
    Regards Nigel

  • Parent/child records from same table

    I want to create a query that is a union such that the 2nd resultset is based on the 1st resultset. I have a table that has parent/child records in the same table.
    Table: EVENTS
    EVENT_ID
    PARENT_EVENT_ID
    CREATED_DATE
    (other columns)
    if PARENT_EVENT_ID is null then it is a parent record, else it is a child record. I want to select all parent records then union them with all the associated child records...something like this:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    This works but it's kind of ugly, I want to avoid using the sub-select in the 2nd because it is a repeat of the 1st statement, is there a way to alias the first statement and just refer to it in the 2nd query?

    Hi,
    kev374 wrote:
    Thanks, one question...
    I did a test and it seems the child rows have to also satisfy the parent row's where clause, take this example:
    EVENT_ID|PARENT_EVENT_ID|CREATED_DATE
    2438 | (null) | April 9 2013
    2439 | 2438 | April 11 2013
    2440 | 2438 | April 11 2013
    select * from EVENTS where CREATED_DATE < sysdate - 9
    start with EVENT_ID = 2438
    connect by PARENT_EVENT_ID = prior EVENT_IDSo you've changed the condition about only wanting roots and their children, and now you want descendants at all levels.
    This pulls in record #2438 (per the sysdate - 9 condition) but 2439 and 2440 are not connected. Is there a way to supress the where clause evaluation for the child records? I just want to pull ALL child records associated with the parent and only want to do the date check on the parent.Since the roots (the only rows you want to exclude) have LEVEL=1, you can get the results you requested like this:
    WHERE   created_date  < SYSDATE - 9
    OR      LEVEL         > 1However, since you're not ruling out the grandchildren and great-grandchildren any more, why wouldn't you just say:
    SELECT  *
    FROM    events
    WHERE   created_date     < SYSDATE - 9
    OR      parent_event_id  IS NOT NULL;?
    CONNECT BY is slow. Don't use it if you don't need it.
    If you x-reference my original query:
    select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null -- All parents
    union
    select * from EVENTS where PARENT_EVENT_ID in (select EVENT_ID from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null) -- include any children of parents selected from above
    The 2nd select does not apply the created_date < sysdate - 90 on the children but rather pulls in all related children :)Sorry; my mistake. That's what happens when you don't post sample data, and desired results; people can't test their solutions and find mistakes like that.

  • How can i get the id of the last child record in hierarchical data

    I want to get the lastest child record  of the parents like 
    the result   
    If I Select A then the result should be  'C' , 'E' , 'F' , 'G'
    If i select D then the result should be 'F' etc
    Thanks
    USE [SMEDB]
    GO
    /****** Object:  Table [dbo].[Table_3]    Script Date: 11/26/2014 2:10:49 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[Table_3](
    [ID] [nvarchar](50) NULL,
    [ParentID] [nvarchar](50) NULL
    ) ON [PRIMARY]
    GO
    INSERT [dbo].[Table_3] ([ID], [ParentID]) VALUES (N'A', NULL)
    INSERT [dbo].[Table_3] ([ID], [ParentID]) VALUES (N'B', N'A')
    INSERT [dbo].[Table_3] ([ID], [ParentID]) VALUES (N'C', N'D')
    INSERT [dbo].[Table_3] ([ID], [ParentID]) VALUES (N'D', N'A')
    INSERT [dbo].[Table_3] ([ID], [ParentID]) VALUES (N'E', N'D')
    INSERT [dbo].[Table_3] ([ID], [ParentID]) VALUES (N'F', N'E')
    INSERT [dbo].[Table_3] ([ID], [ParentID]) VALUES (N'G', N'A')

    WITH cte(ID, ParentID, Lvl, HPath)
    AS (
           SELECT ID,
                  ParentID,
                  0,
                  CAST(ID AS VARCHAR(MAX)) + '\' AS HPath
           FROM   dbo.[Table_3]
           WHERE  ID ='D'
           UNION ALL
           SELECT        e.ID,
                         e.ParentID,
                         m.Lvl + 1 AS Lvl,
                         m.HPath +CAST(e.ID AS VARCHAR(MAX))+ '\'  AS HPath
           FROM          dbo.[Table_3] AS e
           INNER JOIN    cte AS m ON m.ID = e.ParentID
    ),cte1
    AS
    SELECT HPath,id,Parentid,lvl,
    RIGHT(LEFT(HPath,LEN(HPath)-1),CHARINDEX('\',REVERSE(LEFT(HPath,LEN(HPath))))) lst
    FROM   cte WHERE lvl>0
    ) SELECT lst FROM cte1 WHERE NOT EXISTS (SELECT * FROM cte1 c WHERE c.ParentID=cte1.lst)
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • RFFOUS_T: No records selected

    Hi,
    I am trying to run the DME for child support with payment method S. But I get the message that says "No records selected". Pre DME has run fine and has generated the ID feature. The results table has all the garnishment related tables and BT table as well.
    Any help highly appreciated.

    Hi Amosha
    Thanks for the reply. In the REGUH I only see the payment method D and not S, which is prolly why RFFOUS_T is picking up this entry. We want to send the Child Support as an ACH file with the addenda records on it. To this end, we configured the FBZP, FKO3 enabling payment method as S( child support).  Also, in the config. we tried using the RFFOUS_T instead of the payment medium work bench. We also tried switching to Payment Work Bench, in which case, the ACH file is generating but the addenda records are not visible.
    If you or anyone here can help me with, I'd really appreciate that.
    Thanks in advance!
    Edited by: Payroll Noob on Aug 20, 2010 3:58 AM

  • To find all the child records are processed before parent records

    Hi,
    When i am trying to process consignment pulls and my client is using third party tool to insert the data into interface tables. My logic is written in such a way that it should pick parent record associated with child but there is some delay in child records and not all the child records are being pulled with parent.
    In a brief, i need to write a condition in such a way that my parent cursor should pick all the child records with max(last_updated_date) and then it should be processed.
    eg: I have a family and need to catch bus with all my family members. I need to check now for the last family member who get into and should wait for atleast 2mins so as to ensure all my family members are in. I am unable to achieve this with count. Please do revert back soon.
    Details are below:
    CURSOR c_pull (p_pull_id NUMBER) IS----------------------------------parent cursor
    SELECT ecp.ROWID ROW_ID
    ,ecp.*
    FROM consignment_pulls ecp
    WHERE ecp.process_flag IN ( 2, 3 )
    AND ecp.pull_id > NVL(p_pull_id,0)
    ORDER BY ecp.pull_id
    FOR UPDATE OF ECP.PROCESS_FLAG NOWAIT;
    CURSOR c_line (p_pull_id NUMBER) IS----------------------------------child cursor
    SELECT ecpi.ROWID ROW_ID
    ,ecpi.*
    FROM consignment_pull_items ecpi
    WHERE ecpi.process_flag IN ( 2, 3 )
    AND ecpi.pull_id = p_pull_id
    FOR UPDATE OF ecpi.process_flag;
    Edited by: Prathyusha on Apr 5, 2012 12:07 AM
    Edited by: jerry on Apr 5, 2012 12:10 AM

    Hi Helios,
    Thanks for the info. But its not a concurrent request something like we can filter with start date and completion date. Its all about selection of records from headers and lines table and not able to make those selection of header records with a delay of say some 2minutes until all the child records are inserted.
    Thanks,
    Prathyusha.

  • How to identify violeted child record

    Hi,
    I want to delete a record in project_objects table it is giving me this error.
    How to idetify the table which is getting related to this table.
    ORA-02292: integrity constraint (NAIODEV.TEMP_TEY_POB_ID_FK) violated - child record found
    Please suggest me is there any command. to know.
    Thanks
    Sudhir.

    Select Table_Name,constraint_Name, Constraint_Type,r_Constraint_Name
      From User_Constraints A
    Where R_Constraint_Name =(Select Constraint_Name
                                 From User_Constraints B
                                      Where Table_Name='EMP'
                                        And Constraint_Type='P'
      And Constraint_Type='R'
      Select Table_Name,constraint_Name, Constraint_Type,r_Constraint_Name
      From User_Constraints A
    Where Constraint_Name In (Select r_Constraint_Name
                             From User_Constraints B
                                  Where Table_Name='EMP'
                                    And Constraint_Type='R'
                                    Group By r_Constraint_Name
      And Constraint_Type='P'
    table :-  USER_CONS_COLUMNS

  • Find child record of a parent record

    Hi,
    I need to find the child recond of a parent party and if that child also have some
    child then I need to find again and this process will go untill no child record
    found(child is null)
    I am trying to do it by the help of hierarchical query.
    can anyone please help and tell me how can I do that and how can I handle if a parent have multiple childs.
    Mohan

    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
    Also see the third post in this thread:
    {thread:id=2174552}
    This would probably be better suited in the {forum:id=75} forum.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Integrity constraint child record found

    TopLink Version: Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 070323)
    I may be going crazy here, but I keep getting an integrity constraint when I try to delete an object that has 1:M relationship (Resource 1:M Attribute):
    Internal Exception: java.sql.SQLException: ORA-02292: integrity constraint (WEBCENTER.WP_RELATIONSHIP_RES_FK) violated - child record found
    The child object attribute is set to "Private Owned", and there is an FK from the child table to the parent table in the database (this is where the integrity constraint violation is coming from).
    I query for the Resource, register it in the unit of work, call UOW.deleteObject(resource), and then call UOW.commitAndResume(). TopLink is making a sql call to delete the Resource, but it does not first delete the privately owned Attributes which results in the FK violation.
    It should delete the child records first, right?
    In addtion to having the attribute set to "Private Owned", I also have set:
    Batch Reading
    Use Indirection
    Transparent
    Not sure if that makes a difference.

    Use a trigger. Example:
    CREATE OR REPLACE TRIGGER update_parent_chilren
    BEFORE UPDATE OF pkey_column ON parent_table
    FOR EACH ROW
    BEGIN
    UPDATE child_table
    SET fkey_column = :NEW.pkey_column
    WHERE fkey_column = :OLD.pkey_column;
    END update_parent_children;
    null

  • Gender issue when creating Child Record in ESS

    Dear experts,
    I'm currently have a problem when creating new child for family infotype (0021). Everytime I create a new child record, the gender will always be 'Male' eventhough when I input the data, I choose the 'Female' radiobutton, but when I choose Next and display the 'Review' page, the gender will always be Male.
    It make sense if it is creating a spouse record, since the spouse must be an opposite gender, but supposedly I can change the gender freely when I create the child record.
    Is there something I missed out in the customization process? Or is there anything else that could solve this problem?
    I found a topic that almost similar to our problem in Gender Unknown after selecting female/male in Family data But in that topic the gender will always set to  'Unknown', in our problem it will always set to 'Male'
    Thank you for all the answers

    Hi madav ,
    create inforecord me11
    vender name
    mat
    purchase org
    plant
    maintain that and enter,
    go to text  maintain, then click on condition hear maintain as per as the  requirement,
    go back
    click on purchase organization data  then save
    u will not get error .
    hope it will help u .
    thanks
    BIswa

Maybe you are looking for

  • How to sum from multiple tables on one table?

    I have 12 tables covering 4 separate pages in Numbers, with each of the 12 tables summing each row at the bottom of each table. I'd like to take the sums of each of the 12 tables, and sum each of those sums together into one table. For instance, each

  • RFC response -- Email

    Hi  , I am creating a scenario in which response from RFC is sent to sepcific mail ids.. Can you provide helpful links.. Thanks, Vishal

  • Fails with codec not installed error

    Hello all of a sudden Compressor fails to produce ProRes 422 encodes with the error (in the log) "*Processing service request error: Codec not installed*". It is installed as I can use and have used ProRes elsewhere. Running Compressor 3.0.5.

  • Date is displayed in reverse

    While setting the date in analog mode,the date displayed inside the clock is upside down in my new N73 Music Edition. Is this a firmware issue or problem in the phone.Can i change this by changing any setting. I face one more following problem with I

  • Et_FORM_DATA_LOAD

    Trying to handle et_FORM_DATA_LOAD event.  Event fires, but attempting to access any item on the form results in a null exception and program termination.  What could be going wrong?