By SELECTING the _id of the path root

SELECT THE ID

PARENT_ID,

SYS_CONNECT_BY_PATH (ID, ' / ') PATH.

LEVEL LEVELL,

SUBSTR (SYS_CONNECT_BY_PATH (ID, ' / '), 2, LENGTH (SYS_CONNECT_BY_PATH (PARENT_ID, ' / '))-LEVEL) TOP_ID

OF PLANT

WHERE ID <>40005561

CONNECT ID PARENT_ID = PRIOR

START BY PARENT_ID IS NULL

BROTHERS AND SŒURS ORDER BY SORT_CRITERIA;

path levell top_id (here should be only one id how to select first node in path? my query doesnot consider )

/ 400050371
/ 40005037/40005038240005037
/ 400055371
/ 40005537/40005577240005537
/ 40005537/40005577/40005561340005537/4000557
/ 40005537/40005577/40005563340005537/4000557
/ 40005537/40005577/40005564340005537/4000557
/ 40005537/40005577/40005565340005537/4000557
/ 40005537/40005577/40005567340005537/4000557
/ 40005537/40005577/40005568340005537/4000557
/ 40005537/40005577/40005569340005537/4000557
/ 40005537/40005578240005537
/ 40005537/40005578/40005579340005537/4000557
/ 40005537/40005578/40005580340005537/4000557
/ 400027181
/ 40002718/40001349240002718
/ 40002718/40001349/40003347340002718/4000134
/ 40002718, 40001349, 40003347, 40002846440002718/40001349/400033
/ 40002718/40001349/40003347/40002846/40005058540002718, 40001349, 40003347, 40002
/ 40002718/40001349/40003347/40002846/40005762540002718, 40001349, 40003347, 40002
/ 40002718/40001349/40003347/40002846/40005458540002718, 40001349, 40003347, 40002
/ 40002718/40001349/40003347/40002846/40005737540002718, 40001349, 40003347, 40002
/ 40002718/40001349/40003347/40002846/40005769540002718, 40001349, 40003347, 40002
/ 40002718/40001349/40003347/40002846/40012544540002718, 40001349, 40003347, 40002
/ 40002718/40001349/40003347/40002846/40012544/40012562640002718/40001349/40003347/40002846/4001
/ 40002718/40001349/40003347/40002846/40012544/40012582640002718/40001349/40003347/40002846/4001

Hello

If you don't need get the first element in the path, you could do it using SUBSTR or REGEXP_SUBSTR, as shown below:

SELECT SYS_CONNECT_BY_PATH (ename, "/") AS path

, SUBSTR (SYS_CONNECT_BY_PATH (ename, ' / '))

2

, INSTR (SYS_CONNECT_BY_PATH (ename, ' / ') |) '/'

, '/'

2

) - 2

) AS substr_path

, REGEXP_SUBSTR (SYS_CONNECT_BY_PATH (ename, ' / '))

, '[^/]+'

) AS regexp

CONNECT_BY_ROOT ename as root

FROM scott.emp

START WITH mgr IS NULL

CONNECT BY PRIOR empno = mgr

;

Output:

REGEXP SUBSTR_PATH ROOT PATH

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

KING KING KING BEDROOMS

/ KING JONES, KING KING KING

/ KING/JONES/SCOTT KING KING KING

/ KING/JONES/SCOTT/ADAMS KING KING KING

/ FORD/JONES/KING KING KING KING

/ KING KING KING KING/JONES/FORD/SMITH

/ KING/BLAKE KING KING KING

/ ALLEN/BLAKE/KING KING KING KING

/ KING/BLAKE/WARD KING KING KING

/ KING/BLAKE/MARTIN KING KING KING

/ KING/BLAKE/TURNER KING KING KING

/ KING/BLAKE/JAMES KING KING KING

/ KING/CLARK KING KING KING

/ MILLER/CLARK/KING KING KING KING

But you don't need to.  CONNECT_BY_ROOT is simpler and more effective.

Tags: Database

Similar Questions

  • How to select the path to a file icon button to a table?

    I have a SYSTEM_PATHS table name. All physical access paths as 'where the forms of execution are located' or 'where performance reports are located' are stored in its ranks for example (C:\HRMS\FORMS\)
    I memorized the path of the icon files (.ico) inside. The forms of execution can take the path of the icons for the buttons of this table. And access the icon of the chosen path. I use forms 6i. Normally, I put the path of the icon files in the nerve to property of the button as (C:\HRMS\ICON\). But now, here, I don't have a path but its in the column of a table. How to select the path to a file icon button to a table using forms 6i?

    Hello Gul,

    have you tried

    set_item_property('Button name',ICON_FILENAME,);
    

    Concerning
    Marcus

  • Select the path using script

    Hello

    Every now and I have a lot of images to save for web (1-2 k images at once). All images are .psd or path or transparent background. I want to select the path and erease backgrount possible triming. The roads are named different, so this is another problem because the actions in photoshop select only the specific name of the track. So, it is possible to select the path regardless of his name? Or how to write the script of selection of several path names (IE "track 1", "path 2", "choice 1"...) I hope you understand what I want to do...

    I have another script that resizing of images to corect size and save for web. So when I have jpg with white backgroound first I run action in photoshop to cut images and then I run the script to resize all the images, because the script to check if the image is larger or more...

    If you want more information, just ask... I have version CS5 Photoshop

    Kind regards

    voahyeah

    Edit:

    For now, I wrote this:

    app.activeDocument.pathItems.getByName ('path 2') .makeSelection ();

    app.activeDocument.selection.invert ();

    app.activeDocument.selection.clear ();

    and he choose only if the path name is "path 2" else it stops... "."

    So when the personal is way 2 everything is fine but I have 10-15 different names... so it would be great avoid the path names. It is possible to select the first HRAP (if there is more than one)

    or if it is not possible to avoid the path name how wrote if els if block for it to check all path names...?

    ... Thank you

    Hi Voahyeah,

    Here's the Code...

    If (app.documents.length > 0) {}

    var app.activeDocument = docRef;

    var n = docRef.pathItems.length;

    If ((n>0) & (.name docRef.pathItems [0]! = "Work path")) {}

    docRef.pathItems [0] .makeSelection ();

    docRef.selection.invert ();

    docRef.selection.clear ();

    docRef.trim (TrimType.TOPLEFT);

    docRef.selection.deselect ();

    }

    };

    Kind regards

    -yajiv

  • How to select the paths with the same line width

    I would like to know how to select all the paths within a document whose line width are equal at 0.361 points

    I'd appreciate any help.

    Here you go

    #target illustrator
    
    // script.name = selectPathsThisSize.jsx;
    // script.description = selects pathItems that have the same supplied stroke width; limited to 3 decimals;
    // script.required = a document with at least one path item;
    // script.parent = CarlosCanto // 6/5/11;
    // script.elegant = false;
    
    var idoc = app.activeDocument;
    var strokewidth = prompt ("Enter Stroke Width in points of paths to be selected", 0.361, "Select Paths this size:___");
    
    for (i=0 ; i< idoc.pathItems.length; i++)
         {
              var ipath = idoc.pathItems[i];
                   if ( (ipath.strokeWidth).toFixed(3) == Number(strokewidth).toFixed(3))
                        {
                             ipath.selected = true;
                        }
         }
    
    app.redraw();
    
  • Problem to select the path

    Hello

    Have a problem with a file that someone sent me.

    I couldn't choose any path. In any way. I am a newbie. Some paths are green little marked blue.

    Could someone help?

    Just because you said that he is out of line.  Wait times are down the past two days now...

    VELICS, look in your layers palette.  The two layers you want are locked.  To unlock layers, click on the icons of lock beside the layers you want unlocked.

    In addition, all in your outline layer is grouped, making seemingly impossible to select objects or a path.  In the menu item-> Ungroup to, uh, it separate.

  • How to select the path of data through labview

    Hello gurus...
    I'm new user in labview. I want to read and write to the database via labivew. I have
    read and write the program. Now, I want to choose the way of storage of data through labview.
    I tried different ways, but I couldn't.
    First of all read and write the program I did via the UDL file path. Now, I want to choose ".mdb" file path directly.

    I do not know how...
    So if you know please help me...
    Thanks

    Concerning
    Joel M
    India

    Rather than trying to create an Access database, I have simply included a blank database with the installation.  Open, build the tables as required (as your example shows), and then copy (using the copy of the palette of Advanced File i/o) whenever you need it.  Your program will need to know where it is, therefore, store the connection information in a configuration file (as already mentioned) is a possibility.

    Here's how to use a connection string to open a database:

  • Change the path to the e-mail templates

    Hello

    I'm setting up the electronic part of the store, and I need to change the path models because I changed the path of the store (crs /... no longer exists.) Now it's mystorename /...).
    Everything in searching the files I found a few + .properties that define the templateUrl to e-mails, such as email a friend and a forgotten password email templates.

    Although there are some E-mail templates that does not have the property files defining its functions. So, I looked a bit more and discovered that some of the e-mail templates are defined by scenarios, such as "Order Confirmation", "Shipped" and "abandoned order Promo."

    Their traces of origin are: ATG Commerce reference Store:/emailtemplates/templatename.jsp, which reads as crs/emailtemplates/templatename.jsp. I need to change the "/ src" to "/ mystorename" to find the right path, but when I click on 'choose the model mail... ". "I get the following error:
    Error: ATG Commerce Reference Store not found in list of web apps.
    java.lang.Exception: Stack trace
         at java.lang.Thread.dumpStack(Unknown Source)
         at atg.ui.document.DocumentRootSelector.setRootSelection(DocumentRootSelector.java:393)
         at atg.ui.document.J2eeDocumentSelector.setRootSelection(J2eeDocumentSelector.java:245)
         at atg.ui.document.DocumentPicker.createMultiRootSelector(DocumentPicker.java:264)
         at atg.ui.document.DocumentPicker.<init>(DocumentPicker.java:176)
         at atg.ui.document.DocumentPicker.getDocument(DocumentPicker.java:734)
         at atg.ui.document.DocumentPicker.getDocument(DocumentPicker.java:699)
         at atg.ui.process.expression.DocumentAssistant.editExpression(DocumentAssistant.java:83)
         at atg.ui.expreditor.ButtonAssistant.buttonClicked(ButtonAssistant.java:123)
         at atg.ui.expreditor.ButtonAssistant$1.actionPerformed(ButtonAssistant.java:80)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Maybe it's because /crs no longer exists... And now I can not select the path to mystore.

    Why does that happen? Is it possible to change the path to the right pair?

    If anyone has a suggestion or a solution please reply as soon as possible.

    Thank you
    Lucas

    Hello

    If your project is outside the dynamo document root, you will need to change the ' path' to 'with the path of dynamo"and specify the full path to your own model.
    You can change this path in the ordersubmit scenario.

    Hope this helps

  • trace the path does not not in photoshop

    I try to add a brush STROKE in this journey, but I am unable to select the path

    Screen Shot 2015-02-16 at 1.09.19 PM.png

    Check your settings on the options bar. Do you need a work path not a shape path.

  • Change the path inside and outside areas in the vector mask

    Hey all lovers of the PS/CS,.

    This is probably an easy, yet, being pretty new to this, I have to ask.

    I have so this vector mask on a layer, and singing along to the Beatles I'm changing tracks on this subject. Well, what it is is a rectangle to crop a photo, nothing crazy. This rectangle is too big for my taste - so I just draw another, smaller on the inside and plan on deleting one.

    But! The second, smaller rectangle is considered to be a delicacy to take away the first (so its interior is considered to be 'black' mask-wise, that is cut out, and its outer part is 'white', which is kept in). Thus, when you remove that first, largest, the entire image will appear, except for the part that I want in the Middle, which is cut! Yes - it's the opposite of what I want.

    Now, I tried to use the path selection tool and change the fill color of the rectangle, but you can not... So, how you reverse both inside and outside of a closed path? Thanks in advance!

    Charles

    So, how you reverse both inside and outside of a closed path?

    Select the path with the tool Selection of track and in the Options bar change the path of the operations.

  • Why not choose the path of the index.

    Hi Forum,

    Select * from version $ v
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE Production 11.2.0.2.0
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production


    Why optimzer is not to select the path index for query below.
    I have anlyzed in many ways but there is something missing somewhere, it seems. could you help me please...


    create the table test_index_count5 (number);

    Start
    because me 1.100000 loop
    insert into test_index_count5 values (2);
    end loop;
    because loop me in 1.2
    insert into test_index_count5 values (3);
    end loop;
    commit;
    end;

    create index ind_a_tic5 on TEST_INDEX_COUNT5 (a)

    Select one, count (1) test_index_count5 by a group
    2 100000
    3 2

    exec DBMS_STATS.gather_table_stats ('system', tabname = > 'TEST_INDEX_COUNT5', cascade = > true)

    Select * from test_index_count5 where a = 3;
    3
    3

    Select the operation, optimizer, cost, cardinality, bytes, filter_predicates, projection of v$ sql_plan where sql_id = "1xqk2b2k2z8un."

    ALL_ROWS 44 SELECT STATEMENT
    ACCESS 44 50001 150003 TABLE 'A' = 3 'A' [NO.22]


    Select * from dba_indexes where table_name = 'TEST_INDEX_COUNT5 '.

    blocks of sheet - 196
    data AVG by key - 76 blocks
    CF - 152
    Num_Rows - 100002


    Select * from dba_segments where nom_segment = 'TEST_INDEX_COUNT5. '
    blocks - 256 = 17 * 8
    extents - 17

    Select * from dba_extents where nom_segment = 'TEST_INDEX_COUNT5' and block_id not in
    (select block_id from dba_free_space where nom_segment = "TEST_INDEX_COUNT5") - 17



    explain plan for select * from test_index_count5 where a = 3;
    Select * from plan_table
    SELECT STATEMENT
    FULL SYSTEM TEST_INDEX_COUNT5 ACCESS TABLE

    Thank you
    Mahesh

    Published by: Mahesh on 28 Sep 2011 17:56

    Hello Manu,

    one thing resembling trinkets that you use 'system' in your call to exec dbms_stats.

    Environment:

    select * from v$version;
    
    BANNER
    ------------------------------------------------------------------------------------------------------------------
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    
    5 rows selected.
    

    That's what I did:

    CREATE TABLE test_index_count5
      (
        a NUMBER
      );
    
    BEGIN
      FOR i IN 1..100000
      LOOP
         INSERT
           INTO test_index_count5 VALUES
          (
            2
          );
      END LOOP;
    
      FOR i IN 1..2
      LOOP
         INSERT
           INTO test_index_count5 VALUES
          (
            3
          );
      END LOOP;
      COMMIT;
    END;
    /
    
     CREATE INDEX ind_a_tic5 ON TEST_INDEX_COUNT5
      (
        A
      );
    
    exec dbms_stats.gather_table_stats(user,tabname=>'TEST_INDEX_COUNT5',cascade=>true);
    
     SELECT *
       FROM test_index_count5
      WHERE a=3;
    

    That's what I get:

    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
    
    TEST@oraxe_11g> drop table test_index_count5 purge;
    drop table test_index_count5 purge
               *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    
    TEST@oraxe_11g> quit
    Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
    dcl@metaws01:/programs/metasyst/scripts/migration_11g$ sqlplus test/test@oraxe_11g @test.sql 
    
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Sep 28 15:19:27 2011
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
    
    Table created.
    
    PL/SQL procedure successfully completed.
    
    Index created.
    
    PL/SQL procedure successfully completed.
    
             A
    ----------
             3
             3
    
    2 rows selected.
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 3375661399
    
    -------------------------------------------------------------------------------
    | Id  | Operation        | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    -------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT |            | 50001 |   146K|    99   (2)| 00:00:01 |
    |*  1 |  INDEX RANGE SCAN| IND_A_TIC5 | 50001 |   146K|    99   (2)| 00:00:01 |
    -------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       1 - access("A"=3)
    
    Statistics
    ----------------------------------------------------------
              1  recursive calls
              0  db block gets
              3  consistent gets
              0  physical reads
              0  redo size
            354  bytes sent via SQL*Net to client
            337  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              2  rows processed
    
    Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
    

    C.

  • names of streets on the paths / between closed streets

    Hello

    I am new to illustrator and need help:

    I got two layers, with street in names and with many polygons. the space between these polygons are the streets I want the label with the text of the first layer. My problem is that I couldn't find an option to adjust the text in these gaps. I know that there is a function where you can put text on a path, but it would mean I have to cut and paste each street name and create a lot of new paths. There is another problem because a street can have several polygons around it, but when I select all those polygons and then use the path on the text function, it only works on a polygon.

    It would also be a great help if you could tell me how I can make the text parallel to least a polygon, because I turned the text by hand and it looks very bad now.

    example:

    Zwischenablage01.png

    Hans,

    Basically, Steve is right of course (for maps, not to block cards where you should definitely keep the blocks, with respect to the use to the Japan).

    But it may be easier to draw blocks anyway, and you have the opportunity to work on those to create paths for path Type:

    (1) for every street, choose the relevant segments of the block [(such as a) railways (the upper segment of the block under Dudenstrasse and b) segments that follow Manfred-von-Richthofen-Strasse (the first three after the Green block downstairs);]

    (2) with the direct Selection tool, select the segment and Ctrl / Cmd + C + F + X + F to create new access paths are independent upstairs, you can see in the palette layers/panel, and you can select the paths here in the following:

    (3) if there is more than one path [as in case b)], Direct select the adjacent end points and join the paths of access and if necessary [(comme dans l'affaire b) where it addresses the place] add one or more segments, you can just press P, then click on the last point and add the new points;

    (4) apply each path for the Type of path.

    In other words, pull you the part or parts of the block that you need and use it as you would the way street.

  • Track of the path Alters weight change

    Hello!

    At some point during the last two days, I did something in Illustrator (probably an accidental key combination) which causes the physical track structure to change whenever I have change the thickness of the line.

    I took a screenshot and uploaded to YouTube for example:

    http://www.youtube.com/watch?v=9hAA7YIrVwY. You will notice in the video, that as the race gets smaller, the path actually moves to the bottom of the artboard.

    How can I stop this from happening? OR what is the setting that has changed, so that if this happens again in the future, I can fix it? It has been difficult to find an answer, because the keywords are enough relevant about questions of Illustrator.

    Thanks for your help!

    Steve fairbairn says:

    Looks like this thing "snap to grid of pixels" that some bright boy at Adobe thought might be a good idea for CS5.

    In fact it is that a godo idea takes just edutacting users to some extent.

    Select the path and deselect snap to grid of pixels on the transformation Panel. The problem goes away?

  • Simple AddEventListener in the path

    How can I add El in the path 'root.content_mc.inmage_mc.cd_mc '.

    (root.content_mc.inmage_mc.cd_mc) .addEventListener (MouseEvent.ROLL_OVER, OverB2F);

    ?

    MovieClip (root).content_mc.inmage_mc.cd_mc) .addEventListener (MouseEvent.ROLL_OVER, OverB2F);

  • Selection of the partition root Linux in PowerCLI

    I have a report that examines the virtual hard drives and selects the VHD that contains the C:\ drive Windows.  It omits any virtual hard disk that does not contain the C:\ drive Windows.

    How can I change this so that when it falls on a Linux VM, it selects the VHD that contains the root partition and shows on that hard drive and omits others?

    Get-VM |
    Select Name,
      @ {N="OS disk space used";} E={
    $hdC = $_. Comments . Discs | Where {$_. Path -eq "C:\"}
    [
    math]::Round(($hdC. CapacityGB - $hdC. FreeSpaceGB ),1)
    }}

    Thank you!

    Have you tried to test for a path that is "/"?

  • I'm doing a script that takes a list of e-mail from a text file and then allow me to select a save as a string. I found some ways to get the path of the file, but I'm in check by pulling the list

    I found some ways to get the path of the file, but I am defeated by pulling the list from that. the function of the path get gives me the path as "Macintosh Users:: Documents: extractedb.txt (myUsername).

    What I can't understand is how to get a dialog box to display a list that represents the content in the text file, I need to change the contents of the text file, I need the box to show me what I chose and I want to save my selection as a single string.
    e '.

    example of extractedb.txt information:

    [email protected]

    [email protected]

    [email protected]

    * has a random number of emails as well *.

    I want this is to pull those emails from the text file and turn them into a list so I can get to be a selection in my dialog box.

    Any help would be great = D

    Assuming you have a text file with your example e-mail addresses, the following AppleScript will read this file in a list (mf_List) and then use this list as input to choose among the list. Because multiple selection is allowed (control button), the output is sent to a list (sel_addr). We check if the Cancel button was pressed by testing for false and if this condition is met, we the script error.  Based on a single or multiple list item content of the list, display accordingly.

    game of mf to ((path to the folder as text) & "mail_list.txt")

    the value mf_List to {}

    the value sel_addr to {}

    the value mf_List to paragraphs of (read file mf)

    the value sel_addr to (choose from the list mf_List with title ¬

    ('Mail list' with multiple selections allowed without empty selection allowed)

    If sel_addr is equal to false then

    Error number-128

    return

    end if

    If length of sel_addr is equal to 1 then

    sel_addr display dialog box as text

    on the other

    the value Point to the text of TID to AppleScript delimiters

    the value Point text in AppleScript return delimiters

    display the dialog box elements of sel_addr in the text

    the value Text of point AppleScript delimiters to TID

    end if

    return

Maybe you are looking for