Tree Structure with Location & Designation

hi,
i need to populate a tree structure with Department & Job,
so that first level will show the department, 2nd level the designation and 3rd the employees(sorted)
select b.dname, a.job, a.empno, a.ename
  from emp a, dept b
where a.deptno = b.deptno
order by 1,2,3
DNAME          JOB          EMPNO     ENAME
ACCOUNTING     CLERK          7934     MILLER
ACCOUNTING     MANAGER          7782     CLARK
ACCOUNTING     PRESIDENT     7839     KING
RESEARCH     ANALYST          7788     SCOTT
RESEARCH     ANALYST          7902     FORD
RESEARCH     CLERK          7369     SMITH
RESEARCH     CLERK          7876     ADAMS
RESEARCH     MANAGER          7566     JONES
SALES          CLERK          7900     JAMES
SALES          MANAGER          7698     BLAKE
SALES          SALESMAN     7499     ALLEN
SALES          SALESMAN     7521     WARD
SALES          SALESMAN     7654     MARTIN
SALES          SALESMAN     7844     TURNERThanks,
Noushad
Edited by: user517294 on Feb 27, 2010 7:01 PM

Or
SQL> with deptnos as (
  select distinct dname, e.deptno from emp e, dept d where e.deptno=d.deptno  order by e.deptno
jobs as (
select dname ||'/'|| max(job) over (partition by deptno order by job) hierarchy, deptno, job from (select distinct dname, e.deptno, job from emp e, deptnos d where e.deptno = d.deptno)
enames as
select e.deptno, j.hierarchy || '/' || max(ename) over (partition by e.job, e.deptno, ename order by hierarchy) hierarchy, ename from emp e, jobs j where e.job = j.job and e.deptno = j.deptno
select regexp_replace(hierarchy, '.*/', lpad('-',length(regexp_substr(hierarchy, '.*/')),'-')) hierarchy
  from (select dname hierarchy from deptnos
        union all
        select hierarchy from jobs
        union all
        select hierarchy from enames
        order by 1)
HIERARCHY                                                                      
ACCOUNTING                                                                     
-----------CLERK                                                               
-----------------MILLER                                                        
-----------MANAGER                                                             
-------------------CLARK                                                       
-----------PRESIDENT                                                           
---------------------KING                                                      
RESEARCH                                                                       
---------ANALYST                                                               
-----------------FORD                                                          
-----------------SCOTT                                                         
---------CLERK                                                                 
---------------ADAMS                                                           
---------------SMITH                                                           
---------MANAGER                                                               
-----------------JONES                                                         
SALES                                                                          
------CLERK                                                                    
------------JAMES                                                              
------MANAGER                                                                  
--------------BLAKE                                                            
------SALESMAN                                                                 
---------------ALLEN                                                           
---------------MARTIN                                                          
---------------TURNER                                                          
---------------WARD                                                            
26 rows selected.

Similar Messages

  • How to create a tree structure with check boxs using Windows Activex Control?

    Hi,
    I am very new to LabVIEW. I am trying to create a tree structure with Check Boxes like the below. It would be great if someone would show me a right direction to go forward.
    The aim is to select the item and one by one i have to get the Path and give as an input to by application VI.
    Thanks and Best Regards
    Prathap

    Hi Andy,
    Sorry i pasted the Picture.. Pls find the attached picture.
    Following are my requirement:
    1) I need to populate a tree given a root directory, listing all the Folders and file of cetain pattern(*.pjt... ther will be only one *.pjt in every subfolders).
    2) I need a check box for every *.pjt to select the its path. The list of pjt files selected are used for my automation test suit.
    Pls let me know if you need more info.
    Best Regards
    Prathap
    Attachments:
    tree.JPG ‏73 KB

  • Tree structure with checkboxes and radio buttons

    Hi,
    I am using SNODETEXT as tree structure. On the child node, I need to have checkboxes and radio buttons. Is this possible?

    Hi
    Muse does not currently have dropdown lists, radio buttons, or checkboxes as part of the forms. You may want to check out using Adobe FormsCentral, Jotform, or Wufoo and inserting them via Object > Insert HTML as an alternative from the Muse forms, as those forms will have the lists, buttons, and checkboxes you're looking for.
    Another way if you are publishing your site to Business Catalyst, then you can create forms in BC admin section and copy the form html in Muse page which will render the from that you have created in BC in your Muse site page.
    More details :
    http://helpx.adobe.com/business-catalyst/using/create-insert-form.html
    Thanks,
    Sanjit

  • WDA:  Tree structure in web dynpro for ABAP

    Hi,
    I am trying to build a tree structure with information something like the following:
    Country
    State
    City
    I used the UI Element "Tree" and I was successful in building it. The only problem is that it supports only one column in each row like name.
    I need multiple columns in each row like Name and population.
    1) Is there any solution for this using UI element "Tree" only?
    2)I checked that there is Table tree UI element, but I could not figure out how I could use it for hierarchial structure like that of my requirement? Can I use it? Is there any example application with hierarchial structure?
    3)For tree UI element, any node that is not directly below context node has to be non-singleton. It will lead to adverse performance. Is there any solution for this?
    Thanks in advance.
    Regards,
    Srini.

    Hi Srinivasa,
    In the context, please create a node DATA with the following fields:
    KEY type string
    PARENT type string
    LOCATION type string
    POPULATION type string (or "I" if you happen to have numbers only without a unit like "k" for "thousand").
    Then please create a table with a TreeByKeyTableColumn namde LOCATION and an additional TableColumn called POPULATION. Now please add a TextView cell editor to both and bind the text value of each of them to the attributes LOCATION and POPULATION of the context node DATA. Last step is to bind the attribtues rowKey and parentRowKey(?) to the KEY and the PARENT attributes. This concludes the design time part.
    Next step is to fill the node DATA with actual data. Just use a supply function and do it like this:
    First entry:
    KEY = 'WORLD'.
    PARENT = ''.
    LOCATION = 'World'.
    POPULATION = '4 billion'.
    Second entry:
    KEY = 'DE'.
    PARENT = 'WORLD'.
    LOCATION = 'Germany'.
    POPULATION = '80 million'.
    You should now see a table with a tree at the left column that looks like:
    <pre>
      World        4 billion
       ->Germany   80 million
    </pre>
    Kind regards,
    Thomas
    Message was edited by: Thomas Szuecs

  • How to create Tree structure in Visual Composer

    Hi All,
         I need to develop tree structure in my VC application. Can any one of you please suggest me the steps to do it.Its very urgent please can any one help me out in this.
    Regards,
    Lakshmi

    Hi Nutan,
    if you want to solve it with webdynpro it depends on your skills in java and abap. There are books available to start with webdynpro and there are examples for building tree structures with Webdynpro.
    [Java Webdynpro|http://www.sappress.com/product.cfm?account=&product=H983]
    [ABAP Webdynpro|http://www.sappress.com/product.cfm?account=&product=H1916]
    If you want to do it in VC you have to write e.g. an ABAP rfc function module, which returns you the tree with the information about childnode, parentnode and so on, so that you can display it in the table. But if the users click on sort then the tree is "destroyed". You can also display only a few levels of your tree and when you select a certain node a drill down is done by calling a rfc which returns the child nodes of the corresponding node.
    But I think the solution with VC is not the best. Use webdynpro for this requirements.
    Best Regards,
    Marcel

  • How to get Tree structure in JSP page?

    Hi,
    I would like get data from the database and display the data in tree structure with the check boxes at each nodes on a jsp page with out using any third party tools. how can i do that? Do i require any new tags to fulfill this requirement?
    can any one help me out by sending any example code?
    thanks in advance.
    Regards,
    Reddy

    Once you have the data in a list or something, can't you just use <c:forEach> and then output standard nested <ul> and <li> tags to give the tree structure.
    <html>
         <style>
              li
                   list-style-type:none;
         </style>
         <body>
              <form>
                   <ul>
                        <li>
                             <input type="checkbox">Check 1</input>
                             <ul>
                                  <li>
                                       <input type="checkbox">Check 1A</input>
                                  </li>
                                  <li>
                                       <input type="checkbox">Check 1B</input>
                                  </li>
                             </ul>
                        </li>
                        <li>
                             <input type="checkbox">Check 2</input>
                             <ul>
                                  <li>
                                       <input type="checkbox">Check 2A</input>
                                  </li>
                             </ul>
                        </li>
                        <li>
                             <input type="checkbox">Check 3</input>
                        </li>
                   </ul>
              </form>
         </body>
    </html>

  • Search help like tree structure.

    Hi All,
    I have a requirement to display the F4 search help like a tree structure  , with  different
    Node(category fields ), under each node(category fields ) different work centers  will exist.
    Please suggest how I can achieve the tree format categories in search help.
    Thanks for your cooperation.
    Thanks,
    Sri.

    Hi Sri,
    U can have a look at the search help PRCTH in se11, which has an search help exit K_F4IF_SHLP_STANDARD_HIERARCHY
    just execute this and try to debugg it...
    Hope this solves your problem...
    please ack if helpful .
    Best of luck !
    Thanks,
    Ravi Aswani
    Edited by: Ravi Aswani on Mar 15, 2010 8:45 AM

  • Tree Structure?

    Hi Experts,
    I need to create a screen like a Tree Structure like below. If I click on the Reporting Group values folder, it should populate data from one table and by clicking on Reporting Group Levels, it should open the subfolder and need to populate the values based on the selection of folder.
    Is this Tree Structure can be done in Web Dynpro?If yes, how can I go ahead for my development.
    Please clarify me experts.
    BR,
    RAM.

    Hi RAM,
    Yes, it can be done in WDA.
    Your requirement can be achieved as below
    you can create 2 containers side by side in your view i.e. by using PANEL or transparent containers
    Tree structure
    Create tree uielement
    Create context node for tree with required attributes
    Populate the data for tree structure with node key
    Details Display
    Create a table to display data based on tree structure element
    if structure of table of each node/leaf element of tree is different, you can create table ui element dynamically based on your data
    On click of tree element, based on KEY of the selected element, you can populate the details and fill the table in the right side container
    Please refer the demo component for Tree example:
    WDR_TEST_TREE
    Also, check the below links
    Web DynPro ABAP Application using Tree and Frame - Web Dynpro ABAP - SCN Wiki
    SAP nxt: How to create a three level tree node in Webdynpro ABAP
    Hope this helps you.
    Regards,
    Rama

  • How to Display Tree structure in Grid Data ?

    Hi Friends.,
                      I am Using tree control to get the data from database dynamically.
                        Now i use to selected (node or folder) will be display in grid in tree structure with using panel.   any Example coding....?
    Any One Help me.....
    With Regards.,
    Lingu..,

    i've posted some examples to Tree structures in a Datagrid in a topic a few below this one
    http://forums.adobe.com/thread/569070?tstart=0

  • Representing a tree structure in Oracle

    Hi all Oracle users,
    I have the need to represent a hierarchical structure (taken from an .xsd file) into an Oracle database.
    Can anybody give me some directions what is the best approach for storing a tree structure into an Oracle database ?
    Thanks a lot
    Francesco

    Hello,
    thanks for your kind replies.
    Well, the kind of structure I want to flatten in a database, consists of a set of elements, each of whom, contains an undetermined set types:
    <element name="vsDataPlmn" substitutionGroup="xn:vsData">
              <complexType>
                   <complexContent>
                        <extension base="xn:vsData">
                             <sequence>
                                  <element name="userLabel" minOccurs="0"/>
                                  <element name="mnc" minOccurs="0"/>
                                  <element name="mncLength" minOccurs="0"/>
                                       <complexType>
                                            <sequence>
                                                 <element name="mcc" minOccurs="0"/>
                                                 <element name="mnc" minOccurs="0"/>
                                                 <element name="mncLength" minOccurs="0"/>
                                            </sequence>
                                       </complexType>
                                  </element>
                             </sequence>
                        </extension>
                   </complexContent>
              </complexType>
         </element>
    In a previous work of mine, I represented a tree structure with a simple rule: for each element I had:
    Rowid, RowDescription ......., ParentRowId
    This might work, however I wonder if there is any Oracle DB structure which is optimized to represent a hierarchy of elements ?
    Hope I was clear,
    thanks
    Franc.

  • Tree Structure (urgent)

    Hi
    Need to create a tree structure with static values and want the collapse and expand functionality should work along too, on a click of an image (+) or (-).
    Thanks in Advance,
    Sukhmani

    Hi
    Need to create a tree structure with static values and want the collapse and expand functionality should work along too, on a click of an image (+) or (-).
    Thanks in Advance,
    Sukhmani

  • Access rights in case of a tree-like structure, with inheritance

    Hello,
    the project I've just started to work on should include an easy way (from the user's point of view) to grant/revoke access rights on a tree-like structure with inheritance.
    Basically we are working for several international companies who want to use our application to watch/manage some of their web projects - each project belongs to one company and consisting of several 'campaigns' in several countries (there can be several campaigns per country, but each campaign belongs to exactly one country).
    From our point of view this is a tree-like structure, with a 'root' node at the top level, 'companies' at the first level, 'countries' at the second level, 'campaigns' at the third level, and modules of our application (for example a module to display overall stats of the campaing, and so on) at the fourth level. There could be (and probably will be) some more levels, but that's not important at this point - it will always be a tree-like structure.
    The customer's reqirements are natural - the administrators should be able to grant/revoke access to 'subtrees' of this structure. For example the top managers should be able to see all the data related to their company, the local managers should be able to see all the data related to their company in the country they work in, etc. On the other hand the relular employees should not see some of the modules (with details about clients of the company).
    I wonder whether this can be solved using JAAS in an elegant and flexible manner - from the documents / whitepapers / tutorials I've seen till now it seems to me it seems to me not too suitable.
    All the data will be stored in relational database (Oracle, and in some cases PostgreSQL), and it would be nice to have the access rights stored in the same way (but it's not required). We have some ideas how to solve that using a single table containing paths in the tree, but at this point it's only an idea (not a single line of code written).
    We are sure somebody has already to solve such a problem - maybe using JAAS, maybe some other technology - and we don't want to reinvent a wheel. Do you have an idea how to solve this (using JAAS or something else)?

    Well, I forgot to explain what the 'inheritance' means ...
    We do not want to set the access right on each node of the tree - we prefer (as well as the users) to set/store only as much information as needed. We'd like the nodes to inherit the access rights from their parent nodes. For example we'd like granting access to particular project to mean granting access to all campaigns in all countries (related to the project), without the need to set and store these rights for each of the campaigns/countries.

  • How to access SPECIFIC camera attributes tree (camera controls) located in MAX with Labview?

    How to access specific camera attributes tree (camera controls) located in MAX with Labview?
    I want to be able to access frame, trigger and grab properties. Does anyone know?
    Thanks.
    /Peter

    Please see this related thread http://forums.ni.com/t5/LabVIEW/IMAQdr-Property-Node/m-p/1642950/highlight/false#M590168
    Matt
    Product Owner - NI Community
    National Instruments

  • KM Folders with Tree structure

    Hi Experts,
    I found 1 blog in SDN. It is tells how to create tree view with KM Folders using KM API.
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1424. [original link is broken]
    I am developing a custom application for uploading a file in multiple folders with single button click. Here I need tree structure and a check box option for selecting multiple folders. As default in tree view, I couldnot select multiple items. Is there any possible to achive this?.
    Thanks in Advance,
    Venkatesh

    answered by thread "Modifiers in Collection List Renderer to display word wrapping"

  • JPA  -  tree structure mapping    with toplink essential

    I'll try to explain it correctly.
    I store a tree structure in a database. I have just two tables:
    Node which contain a id , and some other info.
    Tree which contain a parent and child
    parent and child are ids from node.
    Since each node can have several childs, and each node can have several parents, I had try a @ManyToMany relationship without sucess.
    Here one small example of my tries :
    @Entity
    @Table(name="node")
    public class Node {
    @Id private int id;
    private List<Node> childs;
    private List<Node> parents;
    @ManyToMany
    @JoinTable(name="Tree")
    public List<Node> getParents(){
         return parents;
    @ManyToMany(mappedBy="parents")
    public List<Node> getChilds(){
         return childs;
    }But I always got several error.
    Anyone have a working example that look like mine ?
    Even after googling for several hours I still find nothing.
    If it helps, I use toplink essential for my persistance layer.

    Please see http://www.oracle.com/technetwork/middleware/toplink/index-085257.html for information on TopLink JPA support.
    So as of TopLink 11, you will need to use EclipseLink's org.eclipse.persistence.jpa.PersistenceProvider as the provider class for JPA support, which is in the eclipselink.jar.
    Best Regards,
    Chris

Maybe you are looking for

  • How to create Directly invoice in VF44 With out VF01

    Dear FI Experts i am sd consultant , i have checked in Google but not able to find please help me in this issue I Want to Create invoice in VF44 Directly with out VF01 Presently i am fallowing this procedure --VA01-VL01N-VF01 -VF44 Now i want To skip

  • Is it possible to send a cancellation meeting to multiple users from my iphone5

    I am away from my PC/Laptop and want to send a cancellation to all members of the meeting from my iphone5 (iOS8). I use Outlook for email and calendar.  When I delete event, it just deletes the meeting from my calendar and does not send a cancellatio

  • Make Editable only for one cell

    Hi, Is it possible to make one cell editable in a non-editable column of a matrix? I have made a column non-editable.  Now, based on a CFL value (which is in another column) selected, i want to make that row's non-editable column as editable. My code

  • Calling Unix-Script from within Oracle and store stdout/stderr in table

    Hi, What I want to do is: 1. Calling a UNIX script (e.g. hello.sh) (from inside the Database) hello.sh echo “Hello World!“ 2. and get the stdout/stderr output back in my Database in a table (e.g. temp_back) table temp_back ID     stdout          stde

  • Adobe Captivate 4 and Windows 7 Enterprise 64 bits - sound doesn´t works

    Hi there, I´m trying to start a new recording, and when I click in Audio button and try to calibrate the sound or record a new audio, it doesn´t works. Thru the sound recorder (tool that comes with Windows 7 - Acessories), it works fine, but using Ad