parent columns and child

Hello world

I have a table "test_table" like below where there is a child column and the parent column. I need to write a query to find out the values of column of child who does not exist in the parent column. I wrote something like that works but is it the right way, or is there a better way?

Thank you


parent of the child
100 200
200 300
300
400

Query:

Select child test_table
where mother <>

Thank you.

PK

Hello

The answer to your question is this query:

SELECT t.child FROM test_table t
WHERE NOT EXISTS (SELECT 1 FROM t1 test_table WHERE t1.child = t.parent);

This get you all the lines where there is no parent with the same value.

However: Why would you have a table like this one with the parent-child relationship within the same table?

Tags: Database

Similar Questions

  • How to upgrade the parent table and child by updating the parent table

    I have a parent EMPLOYEE table that includes columns (sysid, serviceno, employeename...) sysid is the primary key, serviceno is the Unique key and I have DEPENDENT child table includes columns (sysid, employee_sysid, name, date of birth...) there still SYSID is a primary key for the table of dependants, employee_sysid is a foreign key in the EMPLOYEE table.

    Now I want to change SYSID (with the help of the sequence) in the EMPLOYEE table that they want an update in the table of people dependent

    Note: I have 10000 records in the EMPLOYEE table as I have 5 more children tables that need to update new SYSID.

    Please help me

    first disable FOREIGN KEY constraints.
    You can update Parent and child record with the help of the trigger.
    Here I give you an examlpe... It can help u.

    create a parent (id number primary key, name varchar2 (100)) table
    /
    create table child_1 (primary key id, p_id number number, date of birth, date)
    CONSTRAINT FK_id FOREIGN KEY (p_id) REFERENCES parent (ID))
    /
    create table child_2 (key primary id, p_id2, addr varchar2 number number (1000))
    CONSTRAINT FK_id2 FOREIGN KEY (p_id2) REFERENCES parent (ID))
    /

    Insert some test data for the parent tables and children.

    change the constraint to disable child_2 table FK_id2
    /
    change the constraint to disable child_1 table FK_id2
    /

    CREATE OR REPLACE TRIGGER delete_child
    BEFORE parent UPDATE ON
    FOR EACH LINE
    BEGIN
    UPDATE CHILD_1
    P_ID =:NEW.ID SET
    WHERE P_ID =:OLD.ID;
    UPDATE CHILD_2
    SET = P_ID2: NEW.ID
    WHERE P_ID2 =:OLD.ID;
    END;
    /

    then Upadte parent table primary key col and check the children tables.
    do enable constraints...

  • Scenario of two parents SelectoneChoice and child selectOneChoice

    Hello

    I use jdev 11.1.1.5

    I use selectOneChoice cascading. Everything is working fine.but I had another requirement. I have search Vo, that have all of the transient attributes.

    few attribute this choice VO have LOV. For example

    I have childLov1 and parent1 lov. ChildLov1 have views on the criteria that is passed by the attribute of parentLov1.Now I have an another parentLov2 which is almost identical to parentLov1.

    My use case is updated on the basis of parentLov1 or parentLov2 childLov1. Setting a day will come from parentLov1 or, sometimes, parentLov2

    How to get there?

    All three lov of a VO research?  Please suggest?

    I solved this problem using the variable layout application session

  • SQL to align the values of the child with the parent columns

    Hello world

    I'm stumped on how to develop a sql query that generates a report which my child values are aligned with my columns parent based on corresponding years.  Here is an example...

    create table test_yr (yr_id number primary key, yr_nb number);
    insert into test_yr values (1,2013);
    insert into test_yr values (2,2014);
    insert into test_yr values (3,2015);
    
    create table test_parent (parent_id number primary key, parent_yr_id_begin number, parent_title varchar2(100));
    alter table test_parent add foreign key (parent_yr_id_begin) refererences test_yr (yr_id);
    insert into test_parent values (1,1,'This rec starts in 2013');
    
    create table test_child (
         child_id number primary key,
         child_parent_id number,
         child_yr_id_begin number,
         child_title varchar2(100),
         child_yr1_val number, child_yr2_val number, child_yr3_val number, child_yr4_val number, child_yr5_val number
    );
    alter table test_child add foreign key (child_parent_id) references test_parent (parent_id);
    alter table test_child add foreign key (child_yr_id_begin) references test_yr (yr_id);
    insert into test_child values (1,1,3,'This rec starts in 2015',10,20,30,40,50);
    insert into test_child values (2,1,3,'This rec starts in 2015',15,25,35,45,55);
    
    
    

    The child can begin to another to start the year as the parent, which makes different yr1 for parent and yr1 for child.  So, for this example, the child 1 year (2015) = year 3 of the parent.

    I can get the values strictly of the child using the following...

    select child_yr1_val, child_yr2_val, child_yr3_val, child_yr4_val, child_yr5_val
    from test_child
    where child_parent_id = 1;
    
    

    However, I need the report to be based on the first five years of the parent.  And since the child does not start until 2015, two years should be zero.  This is the expected result:

    Yr1 | YR2 | YR3 | yr4 | Yr5

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

    0   | 0   | 10. 20. 30

    0   | 0   | 15. 25. 35

    I am doing it using simple sql without having to use pl/SQL to derive a dynamic query.  But I need to somehow to the height and line up the years... like in this example, yr1 (child) = yr3 (parent), (child) yr2 = yr4 (parent), etc..  I hope that some joints and case statements will do the trick, but I don't know how to use them to get the result that I need.  Can anyone help?  Oracle 11 g 2.

    Thank you

    Mark

    Hi, Mark,.

    Here's one way:

    WITH unpivoted_child AS

    (

    SELECT child_id, child_parent_id

    child_yr_id_begin + child_yr - 1 AS column_num

    val

    OF test_child

    UNPIVOT (val

    FOR child_yr (child_yr1_val AS 1

    child_yr2_val AS 2

    child_yr3_val AS 3

    child_yr4_val AS 4

    child_yr5_val AS 5

    )

    )

    WHERE child_parent_id = 1

    )

    SELECT NVL (y1, 0) AS yr1

    , NVL (y2, 0) AS yr2

    , NVL (y3, 0) AS an3

    , NVL (y4, 0) AS yr4

    , NVL (y5, 0) AS yr5

    Of unpivoted_child

    PIVOT (SUM (val)

    FOR column_num IN (1 AS y1

    2 AS y2

    3 AS y3

    4 AS y4

    5 AS y5

    )

    )

    ORDER BY child_parent_id

    child_id

    ;

    Have 5 columns in the test_child that all say the same thing, obly for different years, isn't a very good design table.  It wouyld be better to have a single table for all the attriburtes that apply to the child and another table for each combination of year, with a single amount on each line.  Because you don't have that, the unpivoted_child of the subquery, it essentially creates on the fly.

  • composite unique constraint on the values of parent and child?

    Is it possible to have a composite unique constraint that contains the values of the child elements? The example below has the "child" elements are offline, but it's preferred, but optional, I know that you can have a unique constraint in the set of tables without using a reference table that contains the constraint and the two columns. How xdb manages this requirement?

    permit:
    <parent ID="1">
       <child><name>test1</name></child>
       <child><name>test2</name></child>
    </parent>
    <parent ID="2">
       <child><name>test1</name></child>
       <child><name>test2</name></child>
    </parent>
    not allowed:
    <parent ID="1">
       <child><name>test1</name></child>
       <child><name>test1</name></child>
    </parent>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
               xmlns:xdb="http://xmlns.oracle.com/xdb"
               xdb:storeVarrayAsTable="true"
               elementFormDefault="qualified">
        
        <xs:element name="parent" type="Parent_T"
            xdb:columnProps="CONSTRAINT parent_pkey PRIMARY KEY (XMLDATA.ID)"
            xdb:defaultTable="PARENT"/>
    
        <xs:complexType name="Parent_T" xdb:SQLType="PARENT_T" xdb:maintainDOM="false">
            <xs:sequence>
                <xs:element name="child" type="Child_T" minOccurs="1" maxOccurs="unbounded" xdb:SQLName="CHILD"
                          xdb:SQLInline="false" xdb:defaultTable="CHILD" "/>
            </xs:sequence>
            <xs:attribute name="ID" xdb:SQLName="ID" use="required" />
        </xs:complexType>
        
        <xs:complexType name="Child_T" xdb:SQLType="CHILD_T">
           <xs:sequence>
             <xs:element name="name" type="xs:string" xdb:SQLName="NAME"/>
           </xs:sequence>
         </xs:complexType>     
    </xs:schema>
    xdb:columnProps = "CONSTRAINT parent_pkey PRIMARY KEY (XMLDATA.ID), * UNIQUE (XMLDATA.» "Child.Name) *" triggers the non-existent attribute


    A possible solution would be to copy the value of the primary key parent of the child element, then I could create a composite unique constraint using only the values of the child. However, I have this same requirement elsewhere in my lowest nested schema, and it can become messy / bad design with cascading of all primary keys on the schema. For example, I have a recursive element in which two attributes must be unique only within the parent company:
    <parent id="1">
       <child a="1" b="1">
          <child a="1" b="2">
             <child a="1" b="1" /> *not allowed
          </child>
       </child>
       <child a="1" b="2" /> *not allowed
    </parent>
    Possible solution:
    <child a="1" b="2" parent_id="1" />
    <xs:complexType name="Child_T>
       <xs:sequence>
          <xs:element name="child" xsd:SQLInline="false" xsd:columnProps="UNIQUE(XMLDATA.a,XMLDATA.b,XMLDATA.parent_id)" minOccurs="0" maxOccurs="unbounded" type="Child_T">
       </xs:sequence>
       </xs:element
    </xs:complexType>
    Is there a better design?

    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi 
    PL/SQL Release 10.2.0.4.0 - Production                           
    CORE     10.2.0.4.0     Production                                       
    TNS for Linux: Version 10.2.0.4.0 - Production                   
    NLSRTL Version 10.2.0.4.0 - Production 

    You can do something like this:

    SQL> DECLARE
      2
      3    xsd_doc xmltype := xmltype('
      4  
      5    
      6      
      7        
      8          
      9        
     10      
     11    
     12    
     13      
     14        
     15          
     16        
     17      
     18    
     19    
     20      
     21        
     22          
     23        
     24        
     25      
     26    
     27    
     28      
     29        
     30          
     31        
     32      
     33    
     34  ');
     35
     36  BEGIN
     37
     38    dbms_xmlschema.registerSchema(
     39      schemaURL => 'test_parent.xsd',
     40      schemaDoc => xsd_doc,
     41      local => true,
     42      genTypes => true,
     43      genbean => false,
     44      genTables => false,
     45      enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
     46    );
     47
     48  END;
     49  /
    
    PL/SQL procedure successfully completed
    
    SQL> CREATE TABLE my_xml_table OF XMLTYPE
      2  XMLTYPE STORE AS OBJECT RELATIONAL
      3  XMLSCHEMA "test_parent.xsd"
      4  ELEMENT "root"
      5  VARRAY xmldata."parent" STORE AS TABLE my_parent_tab
      6  (
      7    VARRAY "child" STORE AS TABLE my_child_tab
      8  )
      9  ;
    
    Table created
    
    SQL> ALTER TABLE my_parent_tab ADD CONSTRAINT parent_uk UNIQUE (nested_table_id, "ID");
    
    Table altered
    
    SQL> ALTER TABLE my_child_tab ADD CONSTRAINT child_uk UNIQUE (nested_table_id, "name");
    
    Table altered
     
    

    Then:

    SQL> insert into my_xml_table values (
      2  xmltype('
      3     test1
      4     test2
      5  
      6  
      7     test1
      8     test2
      9  ')
     10  );
    insert into my_xml_table values (
    *
    ERREUR à la ligne 1 :
    ORA-00001: violation de contrainte unique (DEV.PARENT_UK)
    
    SQL> insert into my_xml_table values (
      2  xmltype('
      3     test1
      4     test1
      5  
      6  
      7     test1
      8     test2
      9  ')
     10  );
    insert into my_xml_table values (
    *
    ERREUR à la ligne 1 :
    ORA-00001: violation de contrainte unique (DEV.CHILD_UK)
    
    SQL> insert into my_xml_table values (
      2  xmltype('
      3     test1
      4     test2
      5  
      6  
      7     test1
      8     test2
      9  ')
     10  );
    
    1 ligne créée.
    

    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14259/xdb06stt.htm#sthref987

  • Parsing sql - cursor parent and child

    Hi all

    What is the parent and child when parsing sql cursor?

    Thank you

    John

    Well, as Anand mentioned you could yourself. Here's a demo of the workaround based. Based on the change of environment, the sliders would be created and will not be shared that I made using the change of parameter of optimizer_mode. This is done in 11201 with the setting optimizer_features_enable on 10201.

    SQL> drop table t purge;
    
    Table dropped.
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> alter system flush shared_pool;
    
    System altered.
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    no rows selected
    
    SQL> save a
    Created file a.sql
    SQL> select * from t;
    select * from t
                  *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    SQL> create table t(a char);
    
    Table created.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    select * from t
    select * from T
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    --------------------------------------------------------------------------------
    VERSION_COUNT EXECUTIONS
    ------------- ----------
    select * from t
                1          1
    
    select * from T
                1          1
    
    SQL> column sql_text format a40
    SQL> /
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from T                                      1          1
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT
    ----------------------------------------
    select * from t
    select * from T
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from T                                      1          2
    
    SQL> alter session set optimizer_mode=first_rows;
    
    Session altered.
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      1          1
    select * from test_sharing where id=:a               1          3
    select * from test_sharing where id=1                1          0
    select * from test_sharing where id=99               1          0
    select * from T                                      2          3
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    
    6 rows selected.
    
    SQL> alter session set optimizer_mode=first_rows_1;
    
    Session altered.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    
    6 rows selected.
    
    SQL> alter session set sql_trace=true;
    
    Session altered.
    
    SQL> alter session set optimizer_mode=first_rows_1;
    
    Session altered.
    
    SQL> select * from t;
    
    no rows selected
    
    SQL> select * from T;
    
    no rows selected
    
    SQL> select sql_text,version_count, executions from V$sqlarea where sql_text like 'select * from t%' or sql_text like 'select * from T%';
    
    SQL_TEXT                                 VERSION_COUNT EXECUTIONS
    ---------------------------------------- ------------- ----------
    select * from t                                      2          3
    select * from test_sharing where id=:a               1          3
    select * from test_sharing where id=1                1          0
    select * from test_sharing where id=99               1          0
    select * from T                                      3          5
    
    SQL> select sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'select * fro
    
    SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ---------------------------------------- ------------ ---------- ---------------
    select * from t                                     0 FIRST_ROWS      1601196873
    select * from t                                     1 FIRST_ROWS      1601196873
    select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    select * from T                                     0 ALL_ROWS        1601196873
    select * from T                                     1 FIRST_ROWS      1601196873
    select * from T                                     2 FIRST_ROWS      1601196873
    
    8 rows selected.
    
    SQL> select sql_id,sql_text, child_number, optimizer_mode, plan_hash_value from V$sql where sql_text like 'select * from t%' or sql_text like 'selec
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS
         1601196873
    
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS
         1601196873
    
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS
         3492249339
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS
         3492249339
    
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS
         2354865636
    
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS
         1601196873
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS
         1601196873
    
    8 rows selected.
    
    SQL> set pagesize 9999
    SQL> /
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_
    ------------- ---------------------------------------- ------------ ----------
    PLAN_HASH_VALUE
    ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS
         1601196873
    
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS
         1601196873
    
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS
         3492249339
    
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS
         3492249339
    
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS
         2354865636
    
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS
         1601196873
    
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS
         1601196873
    
    8 rows selected.
    
    SQL> set linesize 200
    SQL> /
    
    SQL_ID        SQL_TEXT                                 CHILD_NUMBER OPTIMIZER_ PLAN_HASH_VALUE
    ------------- ---------------------------------------- ------------ ---------- ---------------
    89km4qj1thh13 select * from t                                     0 FIRST_ROWS      1601196873
    89km4qj1thh13 select * from t                                     1 FIRST_ROWS      1601196873
    7gbgb5nzcdcf3 select * from test_sharing where id=:a              0 ALL_ROWS        3492249339
    0890tcnrf5jsv select * from test_sharing where id=1               0 ALL_ROWS        3492249339
    7hg3cujy0ya0r select * from test_sharing where id=99              0 ALL_ROWS        2354865636
    ahgbnyrbh7bp1 select * from T                                     0 ALL_ROWS        1601196873
    ahgbnyrbh7bp1 select * from T                                     1 FIRST_ROWS      1601196873
    ahgbnyrbh7bp1 select * from T                                     2 FIRST_ROWS      1601196873
    
    8 rows selected.
    
    SQL> select child_number, child_address, stats_row_mismatch, optimizer_mode_mismatch
      2  from v$sql_shared_cursor where sql_id='ahgbnyrbh7bp1';
    
    CHILD_NUMBER CHILD_AD S O
    ------------ -------- - -
               0 1A610050 N N
               1 1F148DA4 N Y
               2 1A630C90 Y N
    
    SQL>
    

    You can see an inconsistency in the optimizer_mode resulting in another creation of child cursor. You can try to use the parameter cursor_sharing similar value and bind variables that would also cause child several sliders to create. For the view V$ sql_shared_cursor, check the docs.

    HTH
    Aman...

    PS: Please don't bump up to the thread. This is not support so people are not forced to update immediately. All are volunteers so assume that they would update the thread as and when they have / get time to do.

  • Cursors for parent and child, bind variable and library cache

    I was going through the documentation to understand the difference between the parent and the child cursors. Surprisingly, there's not too much help for this. I was able to collect the following information about this

    For each statement SQL cache library contains a cursor "parent" for the text of the SQL statement. The parent cursor is composed of a "handle" that can be searched by the hash value via the library cache hash table and an «object' which contains pointers to each of its «child» cursors Each cursor of the child is also composed of a handle and an object. The child object is composed of two segments numbered from 0 to 6. Lot 0 contains all the credentials for a particular version of the SQL statement and lot 6 contains the execution plan. This distinction between parent and child cursors is maintained even when there is only one version of each SQL statement.

    Lets say that 2 LMD were fired with the same set of variables bind (names of variables were same but differed from the value.) The only difference between the 2 LMD was the value of the variable binding) and under the same conditions of load.

    These DML 2 would be a sliders 2 children of one parent only cursors.

    Please tell me detailed documentation on the subject, so my question is too elementary

    Kind regards
    Vishal

    I'm not sure how useful jumping in stuff like bunch 0 and 6 bunch is in terms of understanding what is a parent and what is a child cursor.
    This quote seems to come from Steve Adams - http://www.ixora.com.au/q+a/0104/19005414.htm
    It's a good idea to cite your references.

    I'll give it a go.

    A cursor is a lot of information stored in memory on a SQL statement.

    The basic information for a parent cursor is the text of the SQL statement - exact matches of the statement can only share the parent cursor.

    The cursor of the child is really on the implementation plan specific for a statement and the different settings and parameters that caused this plan to be generated.

    There are a whole bunch of reasons why the executions of the same SQL statement may or may not reuse the existing child cursors.

    In your example 2 statements that differ by the variable binding are likely to lead to different children, although there are factors that can lead to lie different values, do not share the same children among whom for example, the length of the dregs, Adaptive setting cursor_sharing = similar and histograms, or new features like cursor sharing (on subsequent runs of renowned sql running suboptimal initially).

    It might be useful to see V$ SQL_SHARED_CURSOR. This shows the disparities that cause children to not be shared. There are more than 60 columns in this view which gives an indication of the number of factors that can influence.
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e17110/dynviews_3059.htm#REFRN30254

    You might want to look here the criteria for sharing SQL:
    http://download.Oracle.com/docs/CD/E11882_01/server.112/e16638/memory.htm#i40017

    Away from the main documentation, perhaps some of the writings of the optimizer Development Group could help?
    http://blogs.Oracle.com/mt/mt-search.cgi?blog_id=3361&tag=cursor%20sharing&limit=20

    Christian Antognini described this area very well in the "Oracle Performance Troubleshooting Guide".

    Published by: Dom Brooks on February 24, 2011 16:45

  • BULL, INSERTION IN THE PARENT TABLE AND THE CHILD TABLE

    Hi all

    We use bulk insert to improve performance. How to use this concept when I insert the records parent in table parent and child?

    example... I have a procedure that accepts the array of student objects

    each student object is defined as *(student name, student age, course_object_array) *.

    the 3rd element course_object_array is defined as *(coursename,course fee,facultyname) *.

    a student can be associated with several courses

    Now, I have to insert the data into two tables namely students (studentname, studentage and student_number)
    courses (course_id, coursename, fees, facultlyname, student_number)

    I use sequences to fill the columns student_number and course_id.

    If I use bulk insert, and insert all the records in the parent table how do I the association for each record of a child. How will I know what child folder must be associated with which of the parents?

    Concerning
    REDA

    raj_fresher wrote:
    Hi thanks for the reply Solomon.

    I actually know about the bulk collect and for all...

    Have you read that FOR ALL with in fact BULK COLLECT? It will allow you to bulk insert via for ALL with VOTING student_numbers attributed to each student placed in a collection. Then, you will use this collection collection of course list to fill the RACE table.

    SY.

  • How is a parent and child, rights and roll determind in the script

    How is a parent and child, rights and roll determind in the script as an exe of java or xml. It's first and second user and which assings these rolls? thanx

    Hello

    Thanks for posting your question in the Microsoft Community.

    Sinc you want to determine the parent and the child rights usings script as an exe of java or xml, the question you posted would be best suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums for further assistance:

    MSDN forums

  • Question packets parent and child

    Hello

    Greetings!

    I have a Parent package and a child package that have around 20 packs inside.

    When I run the parent package and a child, the parent package runs in a few seconds, but the 20 jobs in child packages takes 1 hour of time to execute.

    In operator, it is the final parent package watch while the child packages takes time to complete. Have first child packages must complete and Parent packets after that.

    No idea why this happening.we also by controlling refreshing but his does not work.

    Thank you

    Lony

    If you call asynchronously a child/scenario package then it will return control to its parent immediately, what is the nature of asynchronous operations and you to have several processes running in parallel. If you don't want the Parent to complete its execution until all her children are processing you have 2 options:

    (1) not to call asynchronously the child, if you do not have many children parallel execution is the usual approach

    (2) However, if you have several children, parallel execution, make use of the odiwaitforchildsesion tool. You use once at the beginning of the sequence run in parallel and once at the end and this will ensure that your parent package will wait for all asynchronous operations to complete before continue. This link gives a good overview of how to implement asynchronous - parallel execution - ODIExperts.com

  • Problems with the Parent and child Pages...

    I created a parent page with several pages of the child, but when I transferred to my host FTP pages do not come to the top in the hierarchy in the URL bar. I want it to be "www.website.com/parent/child.html" but they come as 'www.website.com/child.html '.

    How can I change this? I thought that by creating a page parent to the child which would automatically when loading pages. Help, please!

    Thank you!!!

    Muse currently publishes all the pages in the root directory of the Web server. It does not create a folder structure based on the structure of the site defined in Plan view. The structure of the site defined in the Plan view is used by the Widget Menu to generate Menus correspondents and submenu entries.

    Hope that specified in the query.

    See you soon,.

    Vikas

  • Responsive HTML5 with mergedprojects, creates a hyperlink to a file in the project html parent to a child html file and it does not work! The child has with the parent TOC, but need to tie. Help, please!

    Hi group!

    I have a brilliant parent project that serves as a springboard for other projects. Users click a component of software they want and are redirected to a page with a list of all the documentation available for this component. Click on the name of a document and access - a lot of PDF files. BUT I also wish they were able to tie the online help for the component. After having read up on the link through / between projects, I knew that I needed to create a parent project (for the page intro and links brilliant) and projects for children (for software components).

    THEN

    I created a parent sensitive HTML5 project and the projects of two children. I compiled the parent to create mergedprojects files, and then open the projects children and collected to the appropriate mergedprojects folder. I then created a hyperlink to the file list html documentation in the project parent towards the child file software component html (output folder and start page [which is the same as the default theme]) and the link does not work! The child and its table of contents appears in the parent TOC so topics are here, but I can't link to them. If necessary, I can send screenshots.

    Where I am dorking this place?

    Thanks in advance for your time and help!

    Scottie 'needs help' gear

    What is your relationship like? And how did you create the link?

    A typical reactive merged help is structured as follows:

    index.htm (Master home page)

    mergedProjects

    childName

    index.htm (starting page for child)

    A child from the index.htm page link would look like this:... /... index.htm

    Kind regards

    Willam

  • How to access the methods of the / in the parent and child responsible sovereign wealth funds?

    Hello world

    Imagine the following configuration. The main SWF load a child swf file.

    In AS2, I would use just _parent or _root to call the desired function. How can be done in AS3?

    Is it still possible? Can I call a function on the main swf that loaded? What happened the other way around, this time of principal to the loaded swf format?

    Thanks for the support!

    See you soon

    :::-)

    In AS3, you can call the _parent (AS2) using MovieClip (parent) (AS3) and similar to the _root.  If you load a child swf, you must understand that the child normally lives in the charger you loaded with, so to return to the loaded swf file you have to go (parent.parent) MovieClip.

    So much to talk to the child going to swf, go through the following discussion...  http://forums.Adobe.com/thread/720211?TSTART=0

  • view column and countof details

    Hi all


    In only one requirement, there are number of application and when the user clicks on the number of applications, it should display a detailed report that will show all customers with a few details.
    for example, if the user clicks the request number is 5, then the detail report must display 5 customers with their details. This is achievable. Please help me and any help will be appreciated

    structure of report

    Branch of the noofapplication (countofappno) delay (case when timediff (sqlday, appdate, sysdate) < = 30 then "within 30 days" when timediff (sqlday, appdate, sysdate) between 31 and 45, then 'high t0 30 to 45 days')

    and I kept the delay as a PivotTable column. so, I can display the number of applications extended to specific days...

    Thanks in advance

    Ashwin,

    In detail, report add formula column scooping 'is requested '. This will pass the respective value of bucket to the child. Very well, you can have any number of columns in the child, particularly among the column TIMESTAMPDIFF (SQL_TSI_DAY, "(YourDateColumn comme date), CURRENT_DATE CAST").

    Example: When you drill # County corresponding to "> 30" of the parent, the child report filter column bucket will have "> 30" value passed and the TIMESTAMPDIFF (SQL_TSI_DAY, CAST "(YourDateColumn comme date), CURRENT_DATE") in the column select will display the number of days that is located within 30 days. "

    Can you try to create a simple report parent and child and let me know the question?

    Rgds,
    DpKa

  • Contextual menu tree different for parent elements and children

    Hi people, I'm trying to write a vi with a tree control... I was able to create a context menu for the item parent by right clicking on the tree-> Advanced-> Run - Time control-> context Menu-> Edit... However, I would like to create two menus, one adapted to the parent element and the other specific to the child elements... any help? Thank you

    I think you need to dynamically create your run menu according to the selected item in the tree control. You can do this by using the menu running events and the functions in the menu in LabVIEW.

    There is a palette for this:

Maybe you are looking for

  • Photos of the iPhone for iMac

    Salvation; I am trying to download pix from my iPhone on my iMac. It has been so easy with iPhoto or Adobe Bridge. But now, nothing seems to work. Same AirDrop does not work. I use Airdrop often between my laptop and my iMac, but I can't seem to do i

  • user account with apple ID

    How can I change my user account to use my password current apple id. If I change the apple password I want the account user to have the same. I understand that you can use to identify apple to reset the user account password but I would use the appl

  • Kindle app

    I just boutght a HP Slate 2 10 inch tablet and the pre-installed Kindle app does not work.  It just runs for 2 seconds and then closes.  I uninstalled and reinstalled several times and no change. Any help for this problem of Kindle app? Thank you Bil

  • HP updates caused my program Weatherbug to stop working.

    I called the hp software support they want a subscription to repair this, hp, I feel, caused has this with their updates as there are others with the same problem. Problem cannot open the weather bug, systemi diagonsis said inconpatable.hp tech told

  • Install New Modem/dongle

    Hello I have a Huawei for vodafone Spain, pay-as-you-go moden.  I just took a contract with Orange Spain which is the modem huawei another. I CAN'T get the computer to recognize that she had changed to Vodafone and Orange, it just does not recognize.