Neat application to create a tree?

Hi all

If I'm in a table:

Step Dependent_Step

100 0
140 100
200 100
200 140
250 100

Can someone suggest a query that would create a nice tree showing the dependencies? (not sure if this is possible)

In this example:

100 is not dependent on the measures
140 depends on 100
200 depends on 100 and 140
250 depends on 100
create table tree (
       father      integer ,
       son      integer
  4  );

Table created.

insert into tree values (100, NULL);

1 row created.

insert into tree values (100, 140);

1 row created.

insert into tree values (100, 200);

1 row created.

insert into tree values (140, 200);

1 row created.

SQL> insert into tree values (100, 250);

1 row created.

SQL>
SQL>
SQL> commit;

Commit complete.

SQL>
SQL> select son||' is dependent on '|| father from tree
  2  connect by prior father = son;

SON||'ISDEPENDENTON'||FATHER
--------------------------------------------------------------------------------
140 is dependent on 100
200 is dependent on 100
200 is dependent on 140
140 is dependent on 100
250 is dependent on 100
 is dependent on 100

6 rows selected.

SQL> 

Tags: Database

Similar Questions

  • Instructions on creating a tree at apex4

    Anyone know where I can find some really good instructions on creating a tree in the apex 4? I have 3 tables (projects, tasks, subtasks) that I try to do in a tree on an apex application.

    See this link for the information you are looking for: http://hitext.ru/i/doc/tree_query_create.htm#BABJAGJJ

    Thank you

    Tony Miller
    Webster, TX

    A lady came up to me on the street, pointed at my suede jacket and said: "do you not know that a cow was murdered for that jacket?
    ' I didn't know there are witnesses ', I replied: "now, I'll have to kill you too. '

  • Creating a tree in the Apex.  I want that the link to an external Site.

    I created a tree in the Apex. I want to link to an external site, but the URL is concatenated with the address of the server, is it possible to remove that?
    Example: Want to link to google.com on a node. Click the node trying to get to Http://servernameofApexserver//google.com

    Hello

    Did you put http:// in your URL? Otherwise, it is considered a relative link.

    Hope this helps,

    John.
    --------------------------------------------
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd

  • MultiTaskFlow liaison: Hi I have a main application and several sub these i added to my resources and using their taskFlows applications in my main application by creating the multitaskFlow binding. My problem is that how can get us currently rendered you

    Hi, I have a main application and many applications these i have added to my resource and using their taskFlows in my main application by creating the multitaskFlow binding. My problem is that how can currently get us renderings taskFlow Id link MultiTaskFlow running through an action created in our main application. Please explain if we can.

    Hello

    Try to remove the af: group in the facet of the toolbar or use this code in your bean.

    UIComponent panelBox is ae.getComponent () .getParent () .getParent ();.

    Kind regards

    Ruben.

  • What is the less expensive software or the online application to create PDFs from multiple files?

    What is the less expensive software or the online application to create PDFs from multiple files?

    The service Pack PDF can be used from a web page or of the CD player. Adobe low cost subscription offering that does this. Online PDF converter, convert to web or Acrobat Reader | Adobe PDF Pack to convert things other than Office documents and images, you need the Acrobat application instead.

  • What is the best Adobe application to create mobile applications from the "ground up"?

    What is the best Adobe application to create mobile applications from the "ground up"?

    This might be useful:

    WEB - how to choose the best tools for your project

    • Adobe Dreamweaver is mainly for professional website developers who live and breathe the programming or for designers and project managers who have learned enough HTML at ease. Even if there are a lot of models and tools of environmental Designer, the major attraction of Dreamweaver is how it offers full access to the code, with immediate feedback (through a split screen) what look like the results. The same content can be published for a desktop browser or mobile devices like the iPhone, iPad or Android smartphones.
    • Adobe Muse is a new tool mainly for graphic designers who want to create and publish Web sites without writing code. With a cooked graphic design interface, Adobe Muse generates the HTML to publish directly to the web. Muse sites can be hosted on the hosting platform integrated Adobe Business catalyst or transferred to a third party hosting provider. Adobe Muse includes widgets, which are built features such as slideshows and albums, that you can drag and drop on the pages of the site. However, Muse currently does not support the development of sites that target mobile devices, like the iPad, iPhone and Android smartphones.
    • Adobe Edge, currently public preview on Adobe Labs, is used to create web animations. The files it produces are usually added to a Web site using a tool such as Dreamweaver. The beauty of the edge, is that animations are based on the latest standards open such as HTML5 and CSS3. With no plug-ins needed, animations work on the latest PC and Mac browsers as well as mobile devices, where the Flash technology is not universally supported.
  • Create a tree of a single object View table

    Hi all

    I use Jdeveloper 11 g PS2

    Can someone tell me how to create a table of tree of a single VO?

    Looks like Frank Nimphius has posted an article on this entitled 'how-to create a picture of the tree to a single object View and how to get access backstage for the data lines' but all links to it repoint towards http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html. I couldn't find it on Connotea, nor was it explained in the book the Oracle Fusion developer's Guide.

    I have no problem, creating a tree with two table, but it is redundant in my case, because the tree is based on a car that references the table. My association of entity is already created that binds the parent_id column column id. And I have a link to view based on the association of the entity. I also create a view for my VO that filters the parent (parent_id = null) records and criteria applied to the instance of VO in the data model. I also have a detail THAT VO from my view link.

    I drag the object instance view my page of the data control panel and select create table tree. In the Edit Connection dialog tree, I press the icon ' green more "to create the level rule tree to the child nodes, and then select the accessor to display the child records and he applies it my rule of high level (normally with two your I get a rule of the child based on the accessor). When I run the page it seems to work a certain number of records but I get duplicate at the end lines and page crashes.

    I'm sure it's something simple, I am on here. Any help will be appreciated.

    Thank you

    Hello

    OTN has got a new infrastructure and ADF Code corner had to be rebuild. I'm working on this week (looks good so far). The URL will change to

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/index-101235.html

    The sample should be back this week

    Frank

  • Application that created on another computer will not connect usb-camera

    Hello, friends!

    I have a problem:

    My application that was created on my computer does not connect usb-camera on the other computer. I installed the LabView run-time engine and the runtime of vision on this computer but it is not useful :-(application is open, but the usb device not running.

    I'll be thanked for any help with this problem!

    Thank you very much!

    It's the solution to the problem:

    Solution:
    To run an exe containing NEITHER-IMAQ for USB functions, follow these steps on the computer that is running the EXE file:

    1. Install the following execution engines:

      • LabVIEW Run - time Engine (same version that was used to develop the VI)
      • Execution of vision engine (same version that was used to develop the VI)
        • One Vision single-seater deployment license is required for each computer target on which you install the runtime of the Vision. See all the related links for more details.
    2. Copy the following dll files to the directory on your development computer system, usually C:\Windows\system32 directory of your target machine system.
      • ImaqDirectShowDll.dll
      • ImaqDirectShowExport.dll
    3. Register at ImaqDirectShowExport.dll by the Windows Start Menu , click run. Type regsvr32 C:\WINDOWS\system32\ImaqDirectShowExport.dll, and then click OK to register the DLL.

      If you are on a different operating system or if the system folder is different and that you want to copy the path instead of typing all the way, you can drag the file to the command line at the prompt to run it, highlight the path, right-click and select it copy.  Paste in the command prompt by right-clicking and selecting window block.

      The ImaqDirectShowDll doesn't have to be registered.

    Once these steps are completed, and the DLL is registered successfully, your EXE will work.  Vision Acquisition software or Vision Development Module must be installed on the target computer.

  • 3rd party applications stop creating desktop shortcuts

    A horse of Trojan and virus completely disabled my browsers, shortcuts, etc..  I just finished restoring my site and everything works except one!

    When I run 3rd party applications they not create the desktop icon that runs the application.  I get an error msg '1909 - failed to create the desktop icon.

    When I go into the folder and right click and create a shortcut, it does not work.

    In iE8, there is only an execution of the installation that creates a shortcut within the app... it does not work.  It is the only part of my installation I have been unable to restore.

    I work part-time at home for a company and I need these desktop icons for programs.  In fact, the icons of the Office for WORD, EXCEL, etc., have also stop working.

    I hope you can help me.

    Mona Glover

    Hi Mona,.

    1. have you made changes on the computer before this problem?

    2. you receive an error message or error code?

    This problem may occur due to virus corruption of system files or system.

    Try the following and see if it helps.

    Method 1:

    Refer to the steps in the following Microsoft article.

    Difficulty of broken desktop shortcuts and common system maintenance tasks

    Note: FixIt would attempt to recover bad sectors on the hard disk, in the course of this process there are chances of data loss from that particular area.

    Method 2:

     

    I suggest you make a sfc scan and test the question.

    The sfc/scannow command. analyzes all protected system files and replaces incorrect versions with appropriate Microsoft versions.]

    Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe): http://support.microsoft.com/kb/310747

    Keep us informed on the status of the issue.

  • force the application to create the file at different location (junction?)

    I use to create Ifolor photo albums. It creates its own folder under 'Documents' that problem because the content is huge and messes up my synchronization of this Document.

    I would like to force Ifolor to create his work top-level folder, in the same place in the form of Documents. There is no option in the program to do.
    How can I do this? Create a junction would do the trick? (e.g. mklink C:\Users\PC\Document\Ifolor C:\Users\PC\Ifolor)
    Ideally, I would like to not only uses folder Ifolor in another location, but also that it creates not the Ifolor folder to the default location for under Documents to it seems to do every time I start the application.
    Or in the registry? Where that would usually be?
    THX!

    in the meantime found the solution:

    Downloaded 'junction link magic', then created a junction between C:\Users\PC\Document\Ifolor and C:\Users\PC\Ifolor.
    the Ifolor application is duped and works very well in the right place.
    Yet, there is the shortcut of junction that show under the terms of the Document, which is fixed by hiding with folder (properties)
  • Hanging application while created workbook XSSF (Apache POI)

    Hello

    We have developed an application (using Netbeans) which, in a single windows is asking for some parameters, reading a few Oracle database data and creating a xlsx spreadsheet on the client side.

    Everything works fine, but we have only one user (among 20 using our application) who has a problem. When the application needs to start creating the file xlsx, it hangs, the file is not yet created on the client side. This only happens on a specific computer

    We cannot reproduce this behavior in our development environment, or in any other machine.

    I tried to create a file xls xlsx (using the HSSFWorkbook instead of XSSFWorkbook) and the problem is not displayed in his laptop. So the behavior seems to be specifically associated with this problem. The Apache POI library used is 3.11.

    Is it possible to track client (no right to administrator unfortunately on this machine) and see exactly what causes this problem only on this machine?

    Note that only JRE is installed on this computer.

    Kind regards.

    Alberto

    Hello

    After you find the error and cheking out how Netbeans using the path class the only problem that could cause the problem was an external library during installation of the JRE.

    For some reason any on the laptop user, there was a library external xbeans.jar (lib/ext under JRE path) including and the old version of the XmlOptions class.

    Remove the old library xbeans, jre lib/ext pot has solved the problem.

    Kind regards.

    Alberto

  • How can I create a tree for a flex definition tab?

    I have several tabs in my content tree and I want to show the user specific tabs to specific roles.

    The problem is, for example, the active product is the cell subtype and sub-type tablets and I want to create a tab to display a few cell phones to a user with the role A and I want to create a tab to display a few tablets to a user with the role of B.

    Thank you for your help.

    I ve found I can only create treetabs for parents to flex and not definition of flex.

    Solved my problem

  • Online form to allow clients to submit a web application and create "Catégories" and affect one area secure the data provided?

    Is it possible a customer filling out a form with some information, that adds data to a web application - but at the same time it creates 6 x 'categories' and affects an area secure web application that has been submitted (by selecting a drop down current secure areas).

    That's what I'm trying to do.

    I have a client that handles the different places.  They download media THAT PDF reports in British Colombia through media downloads and fix them so only those with the correct secure area members to see.  It is then the client has a web application that lists all of the locations.  Each of them has 6 x sets of unique documents that must be downloaded and read by site.   Currently I have added 6 new categories in the admin settings, then go to the web application and manually add the code for the category of support library code appropriate.

    Ideal process:

    1 / the customer logs on to an online form to create a new location - they fill in a few fields of info (name or location, address, etc.)

    2 / they choose a "Secure Zone" that the location belongs to a loss of worms down

    Form 3 / hidden fields and then creates 6 x new categories and place the ID numbers of the category in the web application for the location

    Think I'm too ask a lot... but you never know?

    HI Mel,

    Don't know how to go about this configuration, create categories of the front-end webapps and secure zone allocation is not something you (as a visitor of a site) can do.

  • Create a tree of directories VMS in vCenter (with file check)

    Hello

    I continued with this workflow to create a directory of folder VM on vCenter.  I'm having a problem with the function, on the:

    var found = subfolders.indexOf(folderName);
            if (found == -1) {
                System.log("Building folder " + folderName);
                var newFolder = parentFolderObj.createFolder(folderName);
                System.log("Built directory: " + folderName);
                return newFolder;
                }
            else {
                return;
                }
            }
    

    If the folder does not exist, the script runs as expected and creates the directory correctly.  When the folder does not exist, I want to ignore and move on to the next value.  The error message I get is:

    [18:16:18.782 2013-07-03] [I] subfolder name: Prod
    [18:16:18.784 2013-07-03] [I] subfolder name: UAT
    [18:16:18.786 2013-07-03] [I] subfolder name: DMZ
    [18:16:18.788 2013-07-03] [I] subfolder name: Dev
    [18:16:18.790 2013-07-03] [I] allSubFolders table: Prod, UAT, DMZ, Dev
    [18:16:18.792 2013-07-03] [I] Dev folder already exist. Continue with the order of the day
    [18:16:18.794 2013-07-03] [I] TypeError: cannot read property 'childEntity' of undefined (Workflow: TEST_TNG_New_Site_Folder_Structure / BuildFolderTree (item2) #54)

    Here's the complete code:

    //////////////////////////////////////////////////////////////////////////////
    // CODE: Javascript                                                            //
    // TITLE: BuildFolderTree                                                    //
    // AUTHOR: Brandt Winchell                                                    //
    // COLLABORATOR: robrtb12                                                    //
    // VERSION: 2.0                                                                //
    // DATE MODIFIED: July 3, 2013                                                //
    // PURPOSE:  Build a directory tree in vCenter VM & Template section        //
    // ADDITIONAL INFO: !!Root folder must be created manually before            //
    // running this code!!                                                        //
    //////////////////////////////////////////////////////////////////////////////
    
    //////////////////////////////////////////////////////////////////////////////
    // DECLARE VARIABLES
    var folderBase = ["Dev","DMZ","Prod","UAT"];//base folders
    var folderT1 = ["Servers","Workstations"]; //sub-folders of $folderBase
    var folderT2 = ["Windows","Linux"]; //sub-folders of $folderT1
    var folderT3 = ["Repo1","Repo2","Repo3","Repo4"]; //sub-folders of $folderT2
    var folderT4 = ["T1","T2","T3"]; //sub-folder of $folderT3
    //////////////////////////////////////////////////////////////////////////////
    // GLOBAL EXCEPTION CATCH FOR NULL INPUT VARIABLES
    if (parentFolder == null) {
        throw "REFERENCE ERROR: $parentFolder IS NULL!!";
        }
    //////////////////////////////////////////////////////////////////////////////
    // BUILD THE DIRECTORY TREE
    // create the $folderBase level of directory
    for (var a=0; a<folderBase.length; a++) {
        var newBaseFolder = buildFolderTree(parentFolder, folderBase[a]);
        var parentFolderObj = newBaseFolder;
          // Create the $folderT1 level of folders
        for (var b=0; b<folderT1.length; b++) {
               var newT1Folder = buildFolderTree(newBaseFolder, folderT1[b]);
            var parentFolderObj = newT1Folder;
            // Create the $folderT2 level of folders
            for (var c=0; c<folderT2.length; c++) {
                var newT2Folder = buildFolderTree(newT1Folder, folderT2[c]);
                var parentFolderObj = newT2Folder;
                // Create the $folderT3 level of folders
                  for (var d=0; d<folderT3.length; d++) {
                       var newT3Folder = buildFolderTree(newT2Folder, folderT3[d]);
                    var parentFolderObj = newT3Folder;
                    // Create the $folderT4 level of folders
                    for (var e=0; e<folderT4.length; e++) {
                         var newT4Folder = buildFolderTree(newT3Folder, folderT4[e]);
                        }
                      }
                } 
              }
        }
    //////////////////////////////////////////////////////////////////////////////
    // BUILD FUNCTION $buildFolderTree
    function buildFolderTree(parentFolderObj, folderName) {
        //Get a list of sublfolders
        var children = parentFolderObj.childEntity;;
        var allSubFolders = new Array();
        for (var i in children) {
            if (children[i] instanceof VcFolder) {
                var subfolderParent = children[i];
                var subName = subfolderParent.name; //Get only the folder name
                System.log("subfolder Name: " + subName);
                allSubFolders.push(subName); //Create an array of all subfolder names
                }
            }
            System.log("allSubFolders array: " + allSubFolders);
        //Create folder if the folder does not already exists
        var found = allSubFolders.indexOf(folderName); //Does $folderName exists in array.  False = -1
            if (found != -1) {
                System.log("Folder " + folderName + " already exists. Continue with next item");
                return;
                }
            if (found == -1) {
                System.log("Building folder " + folderName);
                var newFolder = parentFolderObj.createFolder(folderName);
                System.log("Built directory: " + parentFolderObj.name + "/" + folderName);
                return newFolder;
                }
            }
    //////////////////////////////////////////////////////////////////////////////
    

    Fact the kata of Workflow:

    You can find the new version so far best below...

    See you soon,.

    Joerg

    //////////////////////////////////////////////////////////////////////////////
    // BUILD FUNCTION $buildFolderTree
    function buildFolderTree(parentFolderObj, folderName) {
      //Get a list of sublfolders
      var children = parentFolderObj.childEntity;;
      var allSubFolders = new Properties();
      for (var i in children) {
      if (children[i] instanceof VcFolder) {
      var subfolderParent = children[i];
      var subName = subfolderParent.name; //Get only the folder name
      System.log("subfolder Name: " + subName);
      allSubFolders.put(subName,subfolderParent); //Create an array of all subfolder names
      }
      }
      System.log("allSubFolders array: " + allSubFolders);
      //Create folder if the folder does not already exists
      var found = allSubFolders.keys.indexOf(folderName); //Does $folderName exists in array.  False = -1
      if (found != -1) {
      System.log("Folder " + folderName + " already exists. Continue with next item");
      return allSubFolders.get(folderName);
      }
      if (found == -1) {
      System.log("Building folder " + folderName);
      var newFolder = parentFolderObj.createFolder(folderName);
      System.log("Built directory: " + parentFolderObj.name + "/" + folderName);
      return newFolder;
      }
      }
    //////////////////////////////////////////////////////////////////////////////
    
  • Creating a tree

    I am trying to create my first tree with Apex 4.1.
    The user must click on a store name, which will be extended to show the employees in this shop
    My two tables are
    CREATE TABLE  GUS_SHOP_DETAILS 
       (     SHOP_ID NUMBER, 
         SHOP_NAME VARCHAR2(30), 
         ADDRESS VARCHAR2(30), 
         ZIP NUMBER, 
         CITY_ID NUMBER     
       )
    
    CREATE TABLE  GUS_EMPLOYEE 
       (     EMP_ID NUMBER, 
         LNAME VARCHAR2(30), 
         FNAME VARCHAR2(30), 
         SHOP_ID NUMBER, 
         ZIP NUMBER
         )
    and the code of my tree is
    select case when connect_by_isleaf = 1 then 0
                when level = 1             then 1
                else                           -1
           end as status, 
           level, 
           name as title, 
           null as icon, 
           id as value, 
           null as tooltip,
           null as link
     from (
    SELECT 
           SHOP_ID || ':' AS id,
           null as parent,
           SHOP_NAME as name,
           NULL,
           NULL,
           NULL
      FROM GUS_SHOP_DETAILS
    UNION ALL
    SELECT SHOP_ID||':'||EMP_ID as id,
           SHOP_ID as parent,
           LNAME as name,
           NULL,
           NULL,
           NULL
      FROM GUS_EMPLOYEE
    )
    start with parent is null
    connect by prior id = parent
    order siblings by name
    When I run the SQL workshop I get an ORA-01722: invalid number error.

    Can someone point me in the right direction

    See you soon

    Gus

    Hello

    I guess your CITY_ID column is a NUMBER.

     from (
    SELECT CITY_ID as id, /* Id is datatype Number (1) */
           null as parent,
    ...  FROM GUS_CITY_LOOKUP
    UNION ALL
    SELECT CITY_ID||':'||SHOP_ID as id, /* Here is Id is Varchar2 */
           CITY_ID as parent,  /* Number (2)*/
           SHOP_NAME as name,
    ..
    UNION ALL
    SELECT CITY_ID||':'||SHOP_ID||':'||EMP_ID as id,
           CITY_ID||':'||SHOP_ID as parent, /*Varchar2 */
           LNAME as name,
    

    Change the CITY_ID in (1) and (2) of TO_CHAR (CITY_ID) and try.

    Kind regards

Maybe you are looking for