How to total Hierarchy of EMP in Scott / Tiger?

I need to show total of each employee in front of his manager or rollup, using EMP Table, how can I ?
Best Regards,
Luqman

SQL> select lpad(' ', 2*level)||ename employee
  2  ,(select count(*) from emp
  3    connect by prior empno=mgr
  4    start with mgr=e.empno) total_count
  5  from emp e
  6  connect by prior empno=mgr
  7  start with mgr is null
  8  /
EMPLOYEE                         TOTAL_COUNT
  KING                                    13
    JONES                                  4
      SCOTT                                1
        ADAMS                              0
      FORD                                 1
        SMITH                              0
    BLAKE                                  5
      ALLEN                                0
      WARD                                 0
      MARTIN                               0
      TURNER                               0
      JAMES                                0
    CLARK                                  1
      MILLER                               0
14 rows selected.

Similar Messages

  • How to generate XSD from simple table (e.g. emp from scott/tiger)?

    Please excuse the ignorance...
    I've been trying to determine if there's a simple way (i.e. using a command in sqlplus or via a GUI wizard), to point to a simple table (such as the demo 'emp' table), and have Oracle then generate an XML Schema (XSD) file that contains the representation for that table, so that I can use that XSD file with various XML-based tools.
    Any help is appreciated.
    Thanks,
    Mike

    Hi,
    Please refer this how to guide which may give some idea for creation formula:
    http://www.pioneerb1.com/wp-content/uploads/2012/04/How-to-work-with-Crystal-Reports-8.8.pdf
    Thanks & Regards,
    Nagarajan

  • How to create  hierarchy on bi7 by using dtp

    how to create  hierarchy on bi7 by using dtp

    Hi Deba,
    Procedure to create Hierarchies:
    1.      In the Data Warehousing Workbench under Modeling, choose the InfoObject tree.
    2.      If you have assigned the hierarchy basic characteristic to an InfoObject catalog, select the corresponding InfoObject catalog for an InfoArea.
    If the hierarchy basic characteristic does not belong to an InfoObject catalog, choose the InfoArea Non-Assigned Nodes and the InfoObject Catalog Non-Assigned Characteristics.
    3.      Select the characteristic for which you want to create a hierarchy and choose Create Hierarchy from the context menu. The Create Hierarchy dialog box appears. The InfoObject name appears by default.
    4.      Enter a hierarchy name and description (short, medium, long). Other fields may be displayed, depending on which hierarchy properties were selected for the hierarchy basic characteristics
    Fields used to enter the Validity (valid to, valid from) for the hierarchy property Total Hierarchy Time-Dependent
    Fields used to specify the Hierarchy Version for the hierarchy property Hierarchies Version-Dependent.
    5.      Confirm your entries. The Maintain Hierarchy screen appears. You can define the structure of a hierarchy here.
    6.      To create a hierarchy node, you first need to choose an insertion mode:  Insert as First Child or   Insert As Next Neighbor (see Hierarchy Editing Functions).
    7.      Choose the type of node you want to create: Text Node, Characteristic Node, <Hierarchy Basic Characteristic Node> or Interval (see Hierarchy Nodes)
    8.      Repeat this procedure until the hierarchy structure has been set. For more information, see Modeling Nodes and Leaves.
    A hierarchy can contain 50,000-100,000 leaves at most. If your hierarchy is larger, you should insert a level that is used as a navigation attribute or preferably as a separate characteristic in the dimension table.
    9.      You can use Level Maintenance and Hierarchy Attributes to set how the hierarchy is to be displayed and processed in reporting (see Level Maintenance and Hierarchy Attributes).
    10.      Save the hierarchy.
    11.      Activate the hierarchy. See Editing Hierarchies.
    For more info
    [http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a6736e07211d2acb80000e829fbfe/content.htm]
    [http://help.sap.com/saphelp_nw70/helpdata/EN/e6/951d102a6c11d5b2e40050da4c74dc/content.htm]
    Regards,
    Rajkandula

  • I really would like to know how to totally remove Yahoo toolbar from my Firefox browser as well as my computer. I don't like those special toolbars at all.

    I really would like to know how to totally remove Yahoo toolbar from my Firefox browser as well as my computer. I don't like special toolbars at all. I find it irritating that you included one in the newest version of your browser. In the future I would hope you would leave this or any other out. Firefox used to be my favorite browser to use, now I am not going to want to use it because of the extra toolbar. Please tell me there is a way to remove this, not just hide it.

    You can't move the Yahoo Toolbar from IE to Firefox, they are totally different "behind the scenes". However you can install it, [http://us.toolbar.yahoo.com/ http://us.toolbar.yahoo.com/] and I believe if you log in with your Yahoo account it will sync your data.

  • How Can I See How Many Total eMails are in My Inbox?

    Hi,
    My mail boxes on the left side of the window show how many emails have been unread, but I I want to see how many total are in each inbox. Is there a setting that I am missing to be able to see not only the unread, but also total emails?

    Hi BDAqua
    Thanks for the response. I am using a POP account. When I click on a mail box and goto Account Info I have three options:
    1) Messages on server, nothing in there for display
    2) Mailbox Behaviours where I get Notes diplay option, Sent mail option to delete or not, Junk nothing to do with display or Trash, when to delete, nothing on display.
    3) Summary - no options here for any display.
    Am I missing something?
    Thanks
    Brandon

  • How to create hierarchy across more than one dimesion

    Hi experts,
     How to create hierarchy on more than one dimension in SSAS.please guide me.
    Thanks

    Hi ,
    This is not Possible without making changes in the cube design .i.e;
    Using Join for have to create one dimension with all attributes that you require in dimension .
    Lets say you have
    Dim1
     att1
     att2
     att3
    Dim2
      F1
      F2
    You need Hierarchy as below;
    Hier
     att1
     att3
     F2
    1. Add one Table in DSV using Join between both the tables.
    2.Create Dimension using this newly added table.
    3. Create hierarchy
    https://www.simple-talk.com/sql/reporting-services/implementing-user-defined-hierarchies-in-sql-server-analysis-services/
    Thanks
    Please Mark This As Answer or vote for Helpful Post if this helps you to solve your question/problem. http://techequation.com

  • How to view hierarchy in reports

    how to view hierarchy in reports

    Open Query Designer->right click -- properties --- tick mark active hierarchy .. select ur hierarchy (u might have more than 1 hierarchy). Select the option and level and then run the report and you can see the hierarchy level repo.
    assign points if it helps...

  • How to use Hierarchy Filter Selection?

    Hi, experts !
    Could anyone give me a detail for how to use hierarchy filter selection ?
    When i locate a Hier filter selection in the template and execute it, a false info
    accured while filtering data,and the IE inferred the hier node object was missing.
    Then i add another hier filter in the same template, and the secend runs well, however the first one didn't.
    At last, i hide the first one, but the second one can't either.
    Help me !!!
    Thx in advance!

    Thanks Toja !
    Sorry to reply so late !
    The error is line: 51. error:'document.HIERARCHY_MENU_1.NODEID' is null or is not the object.
    The code on line of 51 says:document.HIERARCHY_MENU_1.NODEID.value = i_node;
    Could you please give me some documents on the topic of Hierarchy Filter Selection ?

  • How to create Hierarchy Variable

    Hi,
    Can any one please tell me (step by step) how to craete Hierarchy Variable for Prod Hierarchy?
    Please do not give help.sap.com link..its very confusing and did not help me at all.
    Thanks

    Hello Shalini,
             You need to follow the below steps
    For hierarchy
    1)     To create a hierarchy variable, you need to select the characteristic with the hierarchy. Go to the hierarchy tab in the object properties. Select hierarchy -> Hierarchy variable.
    2)     Go to select hierarchy variable and new variable.
    3)     Give technical name and description, and other details as per requirement.
    4)     Save the variable and select the variable.
    For Hierarchy node variable
    1)     To create a hierarchy node variable, Select a characteristic which has a hierarchy. Select Restrict from the context menu. Select Variable in the Select value list box. Select create new variable.
    2)     Give technical name and description and other details as per requirement. Select type of variable as HIERARCHY NODE
    3)     Save and select the variable.
    Hope this helps,
    Regards.

  • How to maintain Hierarchy?

    Dear all,
    We create a hierarchy on CM Account(InfoObject),Every month there ara some new records should be upload to it.
    The problem is that after upload new records the hierarchy wouldn't maintain,so the report result is wrong.
    I want to kown how to maintain hierarchy ?
    Thanks.

    Hi
    When you are on the infoobject (characteristic only) right click -> Create/Maintain Hierarchy.
    External hier. refers to the hier. you extract from external systems (e.g. Cost center hierarchy in R/3 sys.)
    Internal hier., on the other hand, is the one you create in BW (thru Create Hier. selection). You maintain it manually.
    Please find the Document wiht the Screen shots.
    /people/prakash.bagali/blog/2006/02/07/hierarchy-upload-from-flat-files
    http://help.sap.com/saphelp_nw04/helpdata/en/0e/fd4e3c97f6bb3ee10000000a114084/frameset.htm
    Hope this would be help ful
    Many thanks
    Kiran

  • How to Create Hierarchy

    Dear Experts!!!!!!!!!!
    Can some one explain me in detail, how to create hierarchy.
    both internal and external hierarchy,methodology,steps.................
    Thanks in advance......
    Regards,
    Suman.T

    Explain the steps to load master data hierarchies from R/3 system.
    A summary of the steps are as follows:
    1) Goto Hierachy tab in infobject on to which your loading Hierachy data.
    2) Select With Hierarchies.
    3) Select Hierarchy Properties ( Time Dependent or not time depen..etc..)
    4) Click on External Chars in Hierarchies, in that select the characterstics on which this Hierarchy is depending.
    5) Then Create Infosource, assign Datasource.
    6) Create Infopackage, to load Hierarchies.
    7) Hierarchy section tab in Infoapackage select load Hierarchy and refersh the Available Hierarchies from OLTP, If it is Time dependent select time interval in update  tab.
    8) Then start the load.
    If you want to load from Flat file, some what different way to do it.
    It is normally done by the following:
    Transferring the master datasources in RSA5 to RSA6 and then replicating the DS into BW and assignment of DS to Infosource and cretaion of Infopackage and load it into the master tables.
    Generally, the control parameters for data transfer from a source system are maintained in extractor customizing. In extractor customizing, you can access the corresponding source system in the source system tree of the SAP BW Administrator Workbench by using the context menu.
    To display or change the settings for data transfer at source system level, choose Business Information Warehouse --> General Settings --> Maintaining Control Parameters for Data Transfer.
    Note: The values for the data transfer are not hard limitations. It depends on the DataSource if these limits can be followed.
    In the SAP BW Scheduler, you can determine the control parameters for data transfer for individual DataSources. You can determine the size of the data packet, the number of parallel processes for data transfer and the frequency with which the status IDocs are sent, for every possible update method for a DataSource.
    To do so, choose Scheduler --> DataSource --> Default Settings for Data transfer.
    In this way you can, for example, update transaction data in larger data packets in the PSA. If you want to update master data in dialog mode, smaller packets ensure faster processing.
    Thanks,
    Praveen Yagnamurthy,
    SAP BI Consultant,
    Blue Marlin Systems-INDIA.
    http://bluemarlinsys.com/bi.

  • How to do Hierarchy export?

    Hi,
    Can nay one here suggest me how to export Hierarchy?
    Also it would be apprciated highly if you disclose the name of the ABAP program which would enable the hierarchy upload to BW
    Thanks,
    Ravi

    Hi,
    this will give you a solution for your question:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0403a990-0201-0010-38b3-e1fc442848cb
    regards,
    Raymond Baggen
    Uphantis bv

  • How may total Info Objects can a Info Cube hold?

    Can someone explain how many total Info Objects can be used in the construction of an Info Cube?  Thanks.

    Hi Sandeep, I havent come to a point where in I got some message saying "You have reached a maximum limit".
    I think you can keep on trying and you'll come to know if you get any message.
    ~BD

  • How to find the password of the scott

    How to find the password of the scott
    Any query please

    Hi,
    Its not possible to get the password back from the ORACLE as such.
    Because its not that it saves the passwords as such encrypted.
    Try to give same password for different users and check from DBA_USERS, most of the times you might get different encrypted passwords even though the base password is same - which shows the password is not encrypted as easy to decrypt...
    Only thing you can do is reset the password when someone forgets it as DBA - but not find the old password.
    Regards,
    S.Muthukumar.

  • Sql  plus not accepting user id and password as scott, tiger resp

    Hi, this is mihir shah
    I have just installed oracle9i
    And I have a problem in opening the sql plus. It asks for user id and pass but when entered scott, tiger it always gives a tns error.
    Could you tell me how to make a database & how to log on & how to make a new user id and password

    It seem that you have problem with network connectivity to you database.
    Check the listener status and the configuration of the files: tnsnames.ora & listener.ora
    In all cases you must specified the error.
    Bye, Aron

Maybe you are looking for

  • Long time to load Checkbox

    Hi Community, I have a checkbox based on a LOV . My problem: I have a long time (50 - 60 secs) to load it. If I run the underlying SQL query in SQLDeveloper it takes 0.3-0.5 secs. Is there a way I can speed up the display of the checkbox ? Do you hav

  • System Update 5.0.2 fails to install on Windows 8.1 Preview

    I am trying to install System Update 5.0.2 on a W520 running a fresh install on Windows 8.1 Preview.  Solution Center is already installed.  No other software has been installed on this box, other than standard windows updates. When I try to install

  • I need help installing adobe digital 2.0 on windows 8.

    I have windows 8 and when I try to install the install stops and says I need a certain upgrade for microsoft.net.  I go to the page it says and try install said version and get the message that I have a later version already installed as part of my o

  • Email attachments not exporting from outlook 2013 with Acrobat XI standard

    I can't get my email attachments in Outlook 2013 to export along with the message.   I've got the option checked in the settings to include attachments, and I don't get an error message when the PDF is created.  But it includes the message only, rega

  • Cannot access PubMed

    I was hoping someone could help me reaccess PubMed from my Mac and iPhone. Previously I have had no problems but over the last week I keep getting a error reading saying Safari can't find server. I also cannot access PubMed through EndNote like usual