Connect By Prior - Performance and Missing Parent

I have to say right off the top that I'm not a SQL expert by any means so please be gentle. :)
I have a query that runs through a Bill Of Materials that works except for two things:
1. It is horribly slow - 60-90 seconds to return under 300 rows.
2. It doesn't show the parent node.
I'm looking into indexes now, so I'm not sure if there's an issue there or not. As far as #2 goes, there are two tables that are involved: BOM_STRUCTURES_B and BOM_COMPONENTS_B. Every item below the parent node has a BOM_COMPONENTS_B record. If a BOM_COMPONENT is a parent to other components, there is a BOM_STRUCTURES_B record for that. (In other words, everything that is a parent has a BOM_STRUCTURES_B record, and all the children have a BOM_COMPONENTS_B record that point to the parent - BOM_STRUCTURES_B). The only exception to this is the parent node, which only has a BOM_STRUCTURES_B record (it is NOT a child, so there is no BOM_COMPONENTS_B record). I've added a "UNION" to the bottom of the script below, but it changes my sort order completely.
Here's my script:
select bbm.assembly_item_id,
bic.component_item_id Component ,
msi.segment1 Name,
msi.description Description,
bic.component_quantity Quantity,
lpad( ' ', level*2 ) || level MyLevel
from bom_structures_b bbm
,bom_components_b bic
, mtl_system_items msi
where bbm.bill_Sequence_id = bic.bill_sequence_id
and msi.inventory_item_id = bic.component_item_id
and msi.organization_id = bbm.organization_id
start with bbm.assembly_item_id = 271962
and bbm.organization_id = 85
connect by prior bic.component_item_id = bbm.assembly_item_id;
I've hard-coded "start with bbm.assembly_item_id = 271962", as it is the root node of a tree (BOM).
Here's my structure, with extra fields clipped out:
DBMS_METADATA.GET_DDL('TABLE','BOM_STRUCTURES_B','BOM')
CREATE TABLE "BOM"."BOM_STRUCTURES_B"
( "ASSEMBLY_ITEM_ID" NUMBER,
"ORGANIZATION_ID" NUMBER NOT NULL ENABLE,
"COMMON_BILL_SEQUENCE_ID" NUMBER NOT NULL ENABLE,
) PCTFREE 20 PCTUSED 80 INITRANS 10 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
TABLESPACE "APPS_TS_TX_DATA"
DBMS_METADATA.GET_DDL('TABLE','BOM_COMPONENTS_B','BOM')
CREATE TABLE "BOM"."BOM_COMPONENTS_B"
("COMPONENT_ITEM_ID" NUMBER,
"BILL_SEQUENCE_ID" NUMBER NOT NULL ENABLE,
"PARENT_BILL_SEQ_ID" NUMBER,
) PCTFREE 35 PCTUSED 50 INITRANS 10 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
TABLESPACE "APPS_TS_TX_DATA"
DBMS_METADATA.GET_DDL('TABLE','MTL_SYSTEM_ITEMS_B','INV')
CREATE TABLE "INV"."MTL_SYSTEM_ITEMS_B"
( "INVENTORY_ITEM_ID" NUMBER NOT NULL ENABLE,
"ORGANIZATION_ID" NUMBER NOT NULL ENABLE,
"DESCRIPTION" VARCHAR2(240),
) PCTFREE 10 PCTUSED 70 INITRANS 10 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 131072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 4 FREELIST GROUPS 4 BUFFER_POOL DEFAULT)
TABLESPACE "APPS_TS_TX_DATA"
The relationship between the tables is:
A BOM_STRUCTURES_B has many BOM_COMPONENTS_B where BOM_COMPONENTS_B.PARENT_BILL_SEQ_ID = BOM_STRUCTURES_B.BILL_SEQUENCE_ID. Both BOM_STRUCTURES_B.ASSEMBLY_ITEM_ID and BOM_COMPONENTS_B.COMPONENT_ITEM_ID are related to a single MTL_SYSTEM_ITEMS_B.INVENTORY_ITEM_ID.
Thanks to anyone who can help with this horrible problem I've been fighting with for much too long! :)
Thank you!
Steve

Due to an error in the otn forums (*), this got posted to the wrong forum, sorry for that, I'll repost in the correct one.
*) For the forum admins: I was browsing the SQL/PLSQL forum, clicked on 'new message', got the login prompt, logged in, and apparently this got me to the application server forum for some reason.

Similar Messages

  • Connect by prior performance

    In our application, we have a lot of 'trees' in our data (parent/child relationships within a table). We rely heavily on 'connect by prior' to search through the trees, to find for example values that are defined in one of the parents ('inheritance').
    Lately however, we've been eliminating connect by priors wherever we can lately, because performance is dramatic. No matter what indexes we use, we keep getting full tablescans on large tables because of the connect by priors. Views with 2 connect by priors are deadly for performance.
    What is a good way to optimize connect by priors?
    As an example of why we use connect by prior, consider this:
    table A
    ID   PARENT_ID   NAME    LENGTH
    1    NULL        root    10
    2    1           child   NULLWe consider record 2 'derived' from record 1, inheriting its length. The alternative for connect by prior is to populate the child length whenever the master length changes, and this is what we do in most situations now, but it's hell to keep track of this. If a record changes, you would still have to go down the tree to change all child lengths etc, so we rather use connect by prior.
    Any ideas?

    Ivo, would you please post the table definition (if different than your example), the actual list of indexes, a sample query, and the explain plan for that query?
    I use hierarchical queries extensively on tables with millions of rows. They work very well if all the pieces are in place. Let's see if we can get your queries humming...

  • Is there a connection between the performance and the number of photos?

    Is there a connection between the performance of LR 4 (LR 5) and the number of photos in the catalog? Will it slow down LR with a directory of more than 40,000 images (Win7, 4 Gb RAM)?

    I use lots of smart and dumb collections, lots of keywords too, also on Win7/64 though with 12Gb of Ram.
    Have you read through Optimizing performance, especially running a File > Optimize. Also Performance hints is more handy for troubleshooting.
    John

  • Complex connect by prior query

    I need SQL(for hierarchical tree) for a function which accepts node as input parameter and returns ref cursor.
    Following is a sample tree:
    1
    --2.1
    ----3.1
    ------4.1
    --------5.1
    ----------6.1
    ----------6.2
    ----3.2
    ------4.2
    --------5.2
    --2.2
    ----3.2
    ------4.2
    --------5.2
    ----3.3
    ----3.4
    ------4.1
    --------5.1
    ----------6.1
    ----------6.2
    1 is at the root level and 2.1 & 2.2 are immediate children and so on.
    The output tree should be all related parents and children of the passed node.
    e.g:
    If the input is 4.1, the output tree will be:
    1
    --2.1
    ----3.1
    ------4.1
    --------5.1
    ----------6.1
    ----------6.2
    --2.2
    ----3.4
    ------4.1
    --------5.1
    ----------6.1
    ----------6.2
    If the input is 4.2, the output tree will be:
    1
    --2.1
    ----3.2
    ------4.2
    --------5.2
    --2.2
    ----3.2
    ------4.2
    --------5.2
    The complex part, I guess, is to remove unwanted(not related) branches from the tree.
    Following is the representation of the table RELATIONSHIP
    ID     PARENT     CHILD
    1-------1-------2.1
    2-------1-------2.2
    3-------2.1-----3.1
    4-------2.1-----3.2
    5-------2.2-----3.2
    6-------2.2-----3.3
    7-------2.2-----3.4
    8-------3.1-----4.1
    9-------3.2-----4.2
    10------3.4-----4.1
    11------4.1-----5.1
    12------4.2-----5.2
    13------5.1-----6.1
    14------5.1-----6.2
    Pls. help me out to form this CONNECT BY PRIOR query.
    Thanks in advance.

    make sure you include 2 things in your queries.
    # the row number
    # the level
    for traversing up the tree set
    level = 0 - level and
    row_number = 0 - row_number.
    you than can then do an order by row_number if you union the two queries
    for example:
    ============
    select tbl.child,
    tbl.parent,
    level lvl,
    rownum rn
    from some_table tbl
    start with tbl.parent = 4.1
    connect by prior tbl.child = tbl.parent
    union
    select tbl.child,
    tbl.parent,
    0 - level lvl,
    0 - rownum rn
    from some_table tbl
    start with tbl.child = 4.1
    connect by prior tbl.parent = tbl.child
    order by rn asc

  • CONNECT BY PRIOR and performance of Query Plan

    Anyone,
    I have an SQL Statement that is performing rather slow and I am trying to figure out if I could optimize it. Here is the SQL:
       SELECT/*+ index(MAXIMO.EQNDX99) */
            maximo.equipment.eqnum, maximo.equipment.parent, LEVEL
       FROM maximo.equipment@maxi_dblink
       WHERE parent = :b1 CONNECT BY PRIOR eqnum = parent
       ORDER BY eqnum, LEVELAfter some research in this board I followed some advice found to create an index on the table for both the eqnum, parent and the parent, eqnum. EQNDX99 and EQNDX999 respectivley.
    Now the Qery Plan for this query shows the following:
    SELECT STATEMENT (REMOTE)
       SORT (ORDER BY)
          FILTER
             CONNECT BY
                 INDEX (FAST FULL SCAN) EQNDX99 (NON-UNIQUE)
                 TABLE ACESS (BY USER ROWID) EQUIPMENT
                 INDEX (RANGE SCAN) EQNDX999 (NON-UNIQUE)Now it appears to be using both indexes but it is operating through a DBLINK. Is there anything else I can do to increase performance??? It appears to be using the HINT through the link as well.
    Thanks for any help I can get,
    David Miller

    how long does it takes to complete the query?

  • Connect by prior subquery - performance problem

    Hello,
    I have some data which is organized in a folder tree. The requeriement is to be able to search from any subfolder and down.
    /Documents
    ___Folder A
    ______Doc A
    ______Doc B
    ___Folder B
    ______Doc C
    ______Doc D
    The folder structure is defined in a table called CORNERS where the records(=folders) has a ID/PARENTID relationsship to describe the folder structure.
    Another table, called MASTER, contains the main content. Each item has a CORNERID value which defined in which subfolder the document is located.
    MASTER
    ID CORNERID TITLE INDEX_URL
    100 2 Doc A http://xxx/yy.com
    101 2 Doc B http://xxz/yy.com
    102 3 Doc C http://xyz/yy.com
    103 3 Doc D http://xyz/zz.com
    CORNERS
    ID PARENTID NAME
    1 Documents
    2 1 Folder A
    3 1 Folder B
    MASTER table has ~50000 records
    CORNERS has ~900 records.
    Analyzed nighly and stats are fresh.
    Indexes defined:
    CORNERS_ID_PARENT_IDX corners(id,parentid)
    CORNERS_PARENT_ID_IDX corners(parentid,id)
    MASTER_ID_CORNERID_IDX master(id,cornerid)
    MASTER_CORNERID_ID_IDX master(cornerid,id)
    Oracle Text index (URL based) on MASTER.INDEX_URL
    Foreign key defined:
    MASTER.CORNERID references CORNERS.ID
    If I do a search without involving the hierarchy, then the search runs pretty fast:
    SQL> SELECT COUNT(*) FROM (SELECT a.id, a.cornerid FROM MASTER a WHERE (CONTAINS(title,'$ADS AND {S} AND $PARAMETER',2) > 1 OR CONTAINS(index_url,'$ADS AND {S} AND $PARAMETER',1) > 1) );
    COUNT(*)
    5125
    Elapsed: 00:00:00.14
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1354 Card=1 Bytes=15
    8)
    1 0 SORT (AGGREGATE)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'MASTER' (Cost=1354 Car
    d=758 Bytes=119764)
    3 2 BITMAP CONVERSION (TO ROWIDS)
    4 3 BITMAP OR
    5 4 BITMAP CONVERSION (FROM ROWIDS)
    6 5 SORT (ORDER BY)
    7 6 DOMAIN INDEX OF 'MASTER_TITLE_IDX' (Cost=470)
    8 4 BITMAP CONVERSION (FROM ROWIDS)
    9 8 SORT (ORDER BY)
    10 9 DOMAIN INDEX OF 'MASTER_IDX' (Cost=650)
    Statistics
    1462 recursive calls
    0 db block gets
    5507 consistent gets
    347 physical reads
    0 redo size
    380 bytes sent via SQL*Net to client
    503 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    2 sorts (memory)
    0 sorts (disk)
    1 rows processed
    SQL>
    BUT, if I add a subquery to limit the search to a certain folder tree (which includes ~200 nodes), then the performance is really badly affected. The subquery itself runs fast - around 0.07 seconds, but together with the rest of the query the preformance is really bad:
    SQL> SELECT COUNT(*) FROM (SELECT a.id, a.cornerid FROM MASTER a WHERE (CONTAINS(title,'$ADS AND {S} AND $PARAMETER',2) > 1 OR CONTAINS(index_url,'$ADS AND {S} AND $PARAMETER',1) > 1) AND cornerid IN ( SELECT ID FROM corners START WITH id = 2434 CONNECT BY PRIOR id = parentid) );
    COUNT(*)
    942
    Elapsed: 00:00:01.83
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=118 Card=1 Bytes=175
    1 0 SORT (AGGREGATE)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'MASTER' (Cost=19 Card=
    1 Bytes=162)
    3 2 NESTED LOOPS (Cost=118 Card=8 Bytes=1400)
    4 3 VIEW OF 'VW_NSO_1' (Cost=2 Card=6 Bytes=78)
    5 4 SORT (UNIQUE)
    6 5 CONNECT BY (WITH FILTERING)
    7 6 NESTED LOOPS
    8 7 INDEX (UNIQUE SCAN) OF 'SYS_C002969' (UNIQUE
    ) (Cost=1 Card=1 Bytes=4)
    9 7 TABLE ACCESS (BY USER ROWID) OF 'CORNERS'
    10 6 NESTED LOOPS
    11 10 BUFFER (SORT)
    12 11 CONNECT BY PUMP
    13 10 INDEX (RANGE SCAN) OF 'CORNERS_PARENT_ID_IDX
    ' (NON-UNIQUE) (Cost=2 Card=6 Bytes=48)
    14 3 INDEX (RANGE SCAN) OF 'MASTER_CORNERID_ID_IDX' (NON-
    UNIQUE) (Cost=1 Card=38)
    Statistics
    29267 recursive calls
    0 db block gets
    55414 consistent gets
    140 physical reads
    0 redo size
    380 bytes sent via SQL*Net to client
    503 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    12 sorts (memory)
    0 sorts (disk)
    1 rows processed
    I've tried an alternative syntax, instead of the IN clause like this:
    SELECT COUNT(*) FROM (
    WITH folders AS (
    SELECT ID
    FROM CORNERS
    START WITH ID=2434
    CONNECT BY PRIOR ID= PARENTID
    SELECT a.id
    FROM MASTER a, folders b
    WHERE a.cornerid = b.id
    AND CONTAINS(index_url,'$ADS AND {S} AND $PARAMETER',1) > 1);
    It does runfaster, but still takes around 1 second.
    Any suggestion on how to make this run faster!?
    Thanks in advance!
    -Mats

    how long does it takes to complete the query?

  • Connect by prior with the  hint index not improving the performance

    Hi
    I have a table ORDERS (transaction table) with a parent order and multiple child orders with a field called orig_tid which track it back to main order.Child order can be further amended it will have mapping to immediate parent and immediate parent will have mapping to its parent.
    I want find out al the order associated with main order using connect by prior.
    I have created an index on required fileds but still those are not reducing the bytes. It is foing full index scan which are involving big bytes.
    [code]
    create index idx_test on orders decode(length(nvl(orig_tid,0)),9,substr(tran_no,6),orig_tid)
    SELECT  /*+ (mmd IDX_TEST) */ *
    FROM ORDERS mmd
    connect by prior tid=decode(length(nvl(orig_tid,0)),9,substr(tran_no,6),orig_tid)
    start_with or_number='13454566654553'
    [/CODE]
    Explain Plan
    ID | OPERATION                                |  NAME                 | ROWS               | BYTES    | COST
    0 | SELECT STATEMENT         |                                         | 9768              | 5093K   |       6944
    1|CONNECT BY WITH FILTERING|                          |                         |              |
    2|TABLE ACCESS BY INDEX ROWID|ORDERS |               1                 |534|            319K
    3| INDEX FULL SCAN|            IDX_TEST|     976K|    | 5652
    4|NESTED LOOPS|      |  |  |
    5|CONNECT By PUMP |  |  |  |
    6| TABLE ACCESS BY INDEX ROWID| ORDERS|  9768 | 5093K| 6944
    7| INDEX FULL SCAN | IDX_TEST | 3907|  | 5689
    Message was edited by: NikhilJuneja

    post EXPLAIN PLAN for SQL

  • TS3297 when I press the iTunes button on my ipod touch I get the message 'cannot connect to iTunes store' .  My wifi is working fine, I can connect to safari & you tube, no parental setting in place, and time and date are correct. Can anyone help please?

    When I press the iTunes button on my ipod touch I get the message 'cannot connect to iTunes store' .  My wifi is working fine, I can connect to safari & you tube, no parental setting in place, and time and date are correct. Can anyone help please? I have restored my ipod to factory settings and rest it.

    I also tried moving the date forward by a year and then moving it back to normal and it still doesn't work.  i can't find an automatic update of time zones on my itouch to turn this off.

  • SharePoint - Error_1_Error occurred in deployment step 'Add Solution': Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was rea

    Hi,
    I am Shanmugavel, SharePoint developer, 
    I am facing the below SharePoint 2013 deployment issue while deploying using VS2012.
    If i will deploy the same wsp or existing wsp
    (last build) using direct powershell deployment, the solution adding properly, but the same timeout exception coming while activation the features.  Please find the below error.
    I tried the below activists:
    1. Restarted my dev server, DB server. 
    2. tried the same solution id different server
    3. tried existing wsp file (last build version)
    4. Deactivated all the features, including project Active deployment configuration.... but still i am facing the same issue.
    I hope this is not coding level issue, because still my code is not start running, before that some problem coming.
    Please help me any one.....  Last two days i am struck because of this...

    What you need to understand is the installation of a WSP does not do much. It just makes sure that you relevant solution files are deployed to the SharePoint farm.
    Next comes the point when you activate the features. It is when the code which you have written to "Activate" certain features for your custom solution.
    Regarding the error you are getting, it typically means that you have more connections (default is I guess 100) open for a SQL database then you are allowed to.
    If you have a custom database and you are opening a connection, make sure you close it as well.
    Look at the similar discussion here:
    The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool
    size was reached[^]
    I would suggest further to look at the
    ULS logs[^] to get better insight.
    Manas Bhardwaj's Stream : www.manasbhardwaj.net

  • Using START WITH and CONNECT BY PRIOR in a report

    Hi - I am using Oracle 9i and reports 10g. Does anyone know of a reason why running my sql in TOAD will produce the correct results, but the report is dropping records? I am using start with and connect by prior to build a hierarchy of linked records. The report is dropping the "child records" and only returning records from the route level.
    Thanks you for your help.

    Hi user574499
    Could u pls share us ur Query...?
    Regards,
    Abdetu...

  • Join two Connect By Prior Start With trees and return only common records?

    Oracle 10g Release 2 (10.2)
    I have two tables that have tree structured data. The results, when running the queries individually are correct, however I need to join tree one to tree two in order to obtain only the common records between them.
    -- Tree one
    SELECT ip_entity_name, entity_code, hier_level, entity_parent
    FROM ip_hierarchy
    WHERE hier_level >= 3
    CONNECT BY PRIOR entity_code = entity_parent
    START WITH entity_code = 'MEWWD';
    -- Tree two
    SELECT ip_entity_name, entity_code, hier_level, entity_parent
    FROM ipt_hierarchy
    WHERE hier_level >= 3
    CONNECT BY PRIOR entity_code = entity_parent
    START WITH entity_code = 'IPNAM';
    As I understand, joins may not work with CONNECT BY/START WITH queries?
    Is a WITH clause an option?
    If at all possible, I don't want to put one select in a View database object and join against the other query.
    Thanks.

    Hi JTP51,
    You can use WITH clause or sub-query by using in-line view, without creating any view object in database.
    for example
    SELECT A.IP_ENTITY_NAME, A.ENTITY_CODE, ....
      FROM (SELECT IP_ENTITY_NAME, ENTITY_CODE, HIER_LEVEL, ENTITY_PARENT
              FROM IP_HIERARCHY
             WHERE HIER_LEVEL >= 3
            CONNECT BY PRIOR ENTITY_CODE = ENTITY_PARENT
             START WITH ENTITY_CODE = 'MEWWD') A,
           (SELECT IP_ENTITY_NAME, ENTITY_CODE, HIER_LEVEL, ENTITY_PARENT
              FROM IPT_HIERARCHY
             WHERE HIER_LEVEL >= 3
            CONNECT BY PRIOR ENTITY_CODE = ENTITY_PARENT
             START WITH ENTITY_CODE = 'IPNAM') B
    WHERE A. ENTITY_CODE = B. ENTITY_CODE
    AND ....Best regards,
    Zhxiang
    Edited by: zhxiangxie on Feb 2, 2010 5:35 PM

  • SPP 4.4 on DB2 connection problems and missing documentation

    HI all,
    i'm trying to install a SPP server using DB2 version 9.7.4 but i'm having a lot of connection problems.
    It seems that we are missing some "addendum documentation" on this kind of cofiguration.
    Anyone has this kind of doc?
    Thx
    Enrico

    Hi Enrico,
    Have you tried the ANCILE Product Support Center at http://products.ancile.com?
    Please read through and answer the following questions, as well as being informative to me they may also point you in direction to location of this problem.
    May I know the RWD/OS/DB version?
    Are the server/client located in different location?
    Do you have connection problem between server and client?
    Have you tried to restart the related service and test again?
    Do you have the same problem before or it just happend recently?
    Does the problem happen only on some client machine?
    Does the problem happen only for some document?
    Can you please do the following:
    1. Start uPerform Client software.
    2. On the problem computer, go to Tools > Options in uPerform Client
    3.  In the #General# section, ensure that the Logging levels (Log and
    Publishing) are set to #Debug# by using the drop-down option:
    4. IMPORTANT: Recreate the steps that lead to the issue with your
    uPerform document.
    5. To create the Sysinfo log file, Select Help > About
    Hope this helps,
    Kind Regards,
    Matthew

  • Help regarding CONNECT BY PRIOR AND LEVEL

    Hi
    I need to retreive all the employees that are at the least level under a particular employee. Assume basic emp table.
    I have been using CONNECT BY PRIOR
    select mgr,empno,ename, level from emp
    start with empno=7839
    connect by prior empno=mgrOUTPUT:
    MGR     EMPNO     ENAME     LEVEL
         7839     KING     1
    7839     7566     JONES     2
    7566     7788     SCOTT     3
    7788     7876     ADAMS     4
    7566     7902     FORD     3
    7902     7369     SMITH     4
    7839     7698     BLAKE     2
    7698     7499     ALLEN     3
    7698     7521     WARD     3
    7698     7654     MARTIN     3
    7698     7844     TURNER     3
    7698     7900     JAMES     3
    7839     7782     CLARK     2
    7782     7934     MILLER     3The Output i require should be
    MGR     EMPNO     ENAME     LEVEL
    7788     7876     ADAMS     4
    7902     7369     SMITH     4
    7698     7499     ALLEN     3
    7698     7521     WARD     3
    7698     7654     MARTIN     3
    7698     7844     TURNER     3
    7698     7900     JAMES     3
    7782     7934     MILLER     3Also if i change the empno then i need to get only the employees under that employee only.
    Thanks in Advance,
    G.Vamsi Krishna

    oracle_for_dude wrote:
    can you explain what is this query doing
    SQL> select  mgr,empno,ename, level
    2  from    emp
    3  where   level  > 2
    4  start with  empno = 7566
    5  connect by  prior empno = mgr;
    MGR      EMPNO ENAME           LEVEL
    7788       7876 ADAMS               3
    7902       7369 SMITH               37566 in scott.emp table is employee_id of JONES, It's displaying the selected columns for all the employees in the sub-tree starting with Jones, not including Jones (who is at LEVEL=1) and the people who report directly to Jones (LEVEL=2).
    >
    >
    Thanks in advance

  • Had to purchase two OS X system upgrades, new iPhoto etc. just to connect new iPhone 5 and now half my apps won't work. No rosetta and missing lost dogs pics from iCloud...HELP!

    I had to purchase two OS X system upgrades, snow leopard and mountain lion,  just to connect my new iPhone 5 and somewhere between uploading iPhone 4S pics to iCloud some important pics disappeared then installed new iTunes and purchased new iPhoto all  just to connect new iPhone 5 and now half my apps won't work. No Rosetta to make apps work but its not as simple as upgrading apps and missing lost dogs pics from iCloud...HELP!

    File a complaint with Apple for not giving adequate warning before upgrading OS X that it would render PPC programs dead.
    That someone at Apple said requiring the iPhone 5 to have 10.8 (10.6.8 is the minimum actually) and in order to remain a loyal Apple customer they need to fix this mess and revert your machine and software back to 10.6.8
    You see, 10.6.8 would have ran your iPhone 5 and ran your PPC based software, so whoever told you to upgrade to 10.8 was wrong and they need to fix your machine.
    It can be reverted to 10.6.8 yourself.
    How to revert your Mac to Snow Leopard
    Most commonly used backup methods

  • My contacts have gone missing and my mail account isn't connecting to the server and just says iCloud. Help!!

    My contacts have gone missing and I my mail isn't connecting to the server and saying 'no mail'.
    It is only showing my iCloud Mail box. What can I do to fix this?

    Sounds like you've lost internet connectivity.   Are you on cellular or wifi?

Maybe you are looking for

  • Verizon's response to my 14 years of Loyalty

    Sincerely,     Thank you for your response.  While I fully understand the position that you are in regarding reconnection fees, please also understand our position.  Per the terms and conditions of your contract, Verizon Wireless expects payment on y

  • Portal Entitlements for user defined objects

    Hi, The UUP aggregates the user profile information from different backed data sources. One of the properties in the propertyset is a multivalued property. I populate this by the following code: PropertyMapKey propertyMapKeyM = new PropertyMapKeyImpl

  • Variables for Field Names.

    This may be a silly one for ya but I am having a brain fart now. I am doing a dynamic form where the form questions are created fro a database. The different field names are dynamic variables generated via itererations (++) from the database table. T

  • IMovie when I split the clip it turns gray does anyone know why?

    I split one of my clips and when i dragged it out it turned gray....does anyone know why?

  • JMC Frequently Asked Questions

    Java Mission Control is a tools suite for monitoring, managing and profiling Java applications running in production. It is free for development! This forum is mainly for the Java Mission Control Client. If you have questions about the JVM parts (for