First connect you by: what happens if the Parent is the child?

Version: 11g

Hello

I had a question about starting with Connect by.

Here is an example of using the ORacle of the Emploees table
select case when connect_by_isleaf = 1 then 0 when level = 1 then 1 else -1 end as status,
       level,
       First_name as title,
       NULL  as icon,
       EMPloyee_id as value,
       First_name as tooltip,
       NULL  as link
from EMPLOYEES
start with Manager_id ='171'
connect by prior EMPLOYEE_ID = Manager_id
order siblings by First_name
Now, this works very well and shows the levels. In aid to start with is in fact
start with Manager_id is null
Now, if we use a low level employee in using something like
start with Manager_id = '171'
no row is returned. This is because there is no record of the child for this employee (he is not a Manager).

However, is it possible to at least show that the output of a disc? Any suggestions?

Thank you
Ryan

Published by: ryansun on December 10, 2012 22:51

A way

start with
  ( manager_id ='171'
    or
     (
       employee_id='171'
       and '171' not in (
                         select distinct manager_id
                         from employees
                         where manager_id is not null
                         )
     )
  )

Published by: JAC on December 11, 2012 12:35

Tags: Database

Similar Questions

  • What happens if the PC I just downloaded Itunes on & connected to, does it display not all devices?

    What happens if the PC I just downloaded Itunes on & connected to, does it display not all devices?

    Hello 2sealadies!

    Thank you for joining the communities Support from Apple! Looks like you have a problem with your iTuens on Windows 10 not to recognize your iPhone. I know how important it is that the iPhone is recognized by iTunes. Read this article with steps If iTunes does not your iPad, iPhone or iPod. Specifically, after the first series of measures:

    If you are using a Windows PC

    1. Open Device Manager by following the steps for the version of Windows that you have:
      • Windows 10: Click the search box in the lower left corner, type Device Manager and press ENTER. In the list under Bus USB controllers, find the Apple Mobile Device USB Driver.
      • Windows 8: loose in the right edge of the screen. Press search and enter the Manager devices, and then click Device Manager. If requested, enter your password. In the list under Bus USB controllers, find the Apple Mobile Device USB Driver.
      • Windows 7: click on > Control Panel > system and Maintenance > Device Manager. If requested, enter your password. In the list under Bus USB controllers, find the Apple Mobile Device USB Driver.
    2. Even if you do not find the Apple driver, follow the steps below, based on what you see or don't see.

    The pilot and
    No symbols

    A down arrow
    by the driver

    Exclamation or
    question mark by
    the pilot

    No Apple Mobile
    USB device driver

    You don't see symbols next to the Apple Mobile Device USB Driver

    If you do not see , , or of the Apple Mobile Device USB Driver, look for third-party software conflicts. Then if you still need help, restart your Apple Mobile Device Service or contact Apple technical support.

    You see an arrow down

    If you see next to the Apple Mobile Device USB Driver, the driver with the right mouse button and choose enable from the context menu. Then if you still need help, contact contact Apple technical support.

    You see an exclamation point or question mark

    If you see or the Apple Mobile Device USB Driver, right click on the entry, then manually update the Apple Mobile Device USB driver.

    You do not see the Apple Mobile Device USB Driver

    1. Disconnect your device from your computer.
    2. Save a screenshot by pressing the Home button and sleep/wake button of the device button at the same time. The screen should Flash briefly.
    3. Reconnect your device to your computer.
    4. If you see one of these sections in the Device Manager, expand them:
      • Imaging devices
      • Other devices
      • Portable devices
      • USB Bus controllers

    Now, locate the entry that recognizes the device as a camera. You should see 'Apple IPhone', 'Apple iPad' or 'Apple iPod '. Right-click the device entry, and then manually update the Apple Mobile Device USB driver.

    If a single unknown device appears, follow these steps:

    1. Right click on the unknown device entry.
    2. Choose Properties from the context menu, and then click the Details tab.
    3. In the drop-down menu, select hardware IDS.
    4. If the ID begins with something other than USB\VID_0000 & PID_0000, go into the Device Manager and right click on the entry for device unknown, and then manually update the Apple Mobile Device USB driver.
    5. If the ID begins with USB\VID_0000 & PID_0000, then follow the remaining steps.
    6. Unplug the unit and remove all the USB devices on the computer.
    7. Shut down the computer, and then turn it back on.
    8. Reconnect the device, tests of each USB port for about 30 seconds to see if the device is recognized.
    9. Test with a different, checked 30-pins-USB or the lightning-connector-cable-USB, if they are available.

    If you still need help, contact Apple technical support.

    Manually update the Apple Mobile Device USB driver

    If one of the sections above directs you to this section, you should already have right click on an entry in the Device Manager. Now, follow these steps:

    1. Choose update driver software.
    2. Choose "Browse my computer for driver software."
    3. Choose "Let Me pick from a list of drivers for devices on my computer.

  • Click the disk button. If this is not available, choose a category of devices such as Mobile phone or storage device, if in the list.
  • Click Next. You should see the disk button.
  • Click Browse and navigate to C:\Program Files\Common Apple Mobile Device Support\Drivers.
  • Double-click the file "usbaapl. If you have a 64-bit version of Windows, this file will be called "usbaapl64". If you do not see here "usbaapl64" is not a Drivers folder, look in C:\Program Files (x 86) \Common Files\Apple\Mobile Device Support\Drivers.
  • In the disc window, click Open, and then click Next and then click Finish.
  • Windows installs the driver. If a message indicates that the software that you install "not passed the Windows Logo test", click on continue. You can get help with other common errors and the error code numbers in this Microsoft article.
  • Open iTunes to make sure that iTunes recognizes your device. If not, Restart the Apple Mobile Device Service.
  • See you soon!

  • What happens when the photo of system library is on an external drive and then the system creates a library of Photos? How do merge you them?

    What happens when the photo of system library is on an external drive and then the system creates a library of Photos? How do merge you them?

    Your library system can be on an external drive, if the drive is Mac OS extended (journaled) format and mounted on-site.

    But you must be careful, your external drive is always connected and available before the Photos and to import new photos.

    If Photos opens a different library, news, you can switch to the library on your external drive by double clicking on an external library. You can have several libraries, no problem.

    But pictures don't have any tools to merge libraries. You can switch between libraries, then open them alternately.  To merge two libraries export the photos of the smallest library and import the photos exported in the largest library.

    Or use third-party "PowerPhotos" to move photos between libraries.  But the merger is not supported in the free trial version. You must purchase the full version. You can download it here: Fat Cat Software

  • What happens to the creation of files if unsubscribe you, but restart later?

    I use first for now so think to cancel my subscription to save $.

    No one knows what happens to the creation of files if you cancel your subscription, and then re - start more later (more than 90 days)?

    You always have access to all your previous changes, title cards, etc., or only for the finished videos?

    Thank you

    -Peter

    Peter Schurman says:

    You always have access to all your previous changes, title cards, etc., or only for the finished videos?

    You will always have access to your projects and your property all partners. If the versions change before re - activate, you can either update your project (s) to be compatible with this new version, otherwise install an older version. Your membership of limitation in this mode is a form of use of the perfectly valid CC and is one of the biggest advantages of the model of the subscription, IMO.

  • What happened to the button on the address bar which allow you to see the pages you had been so that you don't have to click the back button several times? I use it all the time and it is not on FF4.

    What happened to the button on the left end of the address bar which allow you to see the pages you had been so that you don't have to click the back button several times? You can look at the drop down window of pages and just choose whatever you want. I use it all the time and it is not on FF4. I want to go back to the old FF.

    If you right click on your back button, or click and hold down the mouse button, it will display the list. (I prefer a click-right, because sometimes my fingers slide when I try to click and hold)

  • What happened to the bar that says 'file, edit' etc.? How can I change the font size to display Hotmail? Where can I access 'Cancel '? Thank you-

    How can I access the toolbar which includes "file, print" etc.? How can I change the font size of my hotmail home page? It used to be using "display".

    In Firefox 3.6 and later Windows, you can hide the menu bar on "view > toolbars" or via the contextual right click menu on a toolbar.
    Press F10 or press and hold the Alt key to bring up the menu bar temporarily.
    Go to "view > toolbars", right click on the menu bar, or press Alt + V T to select to show or hide toolbars (click on an entry to switch from the State).

    See also what happened to the file, edit and view menus? and http://kb.mozillazine.org/Toolbar_customization

  • Windows XP: I have 448 MB of RAM available. What happened to the 64 MB of RAM lack and how can I solve this problem. Thank you

    I am trying to install application constant guard Internet Security of Comcast.  After trying to download and install the product, I get and RAM error message indicating I need 512 MB of RAM to install this product, and I only have 448 MB of RAM available.  What happened to the 64 MB of RAM lack and how can I solve this problem.  Thank you

    The only way to see more of RAM is to install a graphics card and disable the onboard graphics of your motherboard. If you do this, you should be able to see all the 512 MB of it.

    That being said, I will repeat what I said before...
    You can always buy more RAM and install it on your motherboard. Go to crucial.com for more information.
    In addition, you should review install 'Internet Security' application or suite. They are not necessary (you can easily configure Windows so that it is very safe) and they often ruin the performance of a PC.
    If you want advice in "hardening" your PC security, let know us.
  • What happened to the "out of office assistant" for the email, when you will be missing? is there another product now?

    What happened to the "out of office assistant" for the email, when you will be missing?

    is there another product now?

    Saturday, September 15, 2012 20:29:54 + 0000, blb_899 wrote:

    What happened to the "out of office assistant" for the email, when you will be missing?

    "Out of Office" is a function of an e-mail program. Not all e-mail messages
    programs for this. What email program are you using?

    Ken Blake, Microsoft MVP

  • What happened to the image field when you create a field of type of image for the Web application?

    What happened to the image field when you create a field of type of image for the Web application?

    The answer is that the point of the IMAGE has been changed to the MEDIA.

    Sorry, Ian, what research for this discussion, I got no results. All good and thanks for the carillon. Hope everything goes well.

    Mouma

  • What happened to the feature to get around on the artboard by pressing the space bar and dragging with the mouse?

    What happened to the feature to get around on the artboard by pressing the space bar and dragging with the mouse?

    cwalker,

    If it does not, it may be time for the list:

    Sometimes, (some) things may fail or stop working for no apparent reason. When (other) possible reasons/remedies do not work, it is perhaps a kind corruption (temporary or permanent), or even preference settings which disturbs, which can be cured with something on the following list put in place in order to provide a catch-all solution for otherwise intractable cases. It starts with a few easy suggestions and safe) 1 and 2) for cases less serious and goes two ways 3) and 4) to reset the default preferences (easily but irreversibly and more laboriously but more completely and also reversible), then follows a list 5) various other possibilities, and it ends with a complete reinstallation 6). If no other suggestion doesn't work, or if no other suggestion appears, you can start on the list and decide how to go or who can apply.

    The following is a general list of things, try when

    (A) the question is not in a specific file,

    (B) you have a printer installed, connected and turned on if it's a physical printer (you can use Adobe PDF/Acrobat Distiller as a printer by default without the need to have a printer on, of course you will need to specify when you really need print on paper), and

    (C) It is not caused by problems with opening a file from external media (see below).

    You tried/made some of them already; 1 and 2) are easier for temporary strangenesses and 3) and 4) specifically may be corrupted/inconvenient preferences); ((5) is a list in itself and 6) is the last resort.

    If possible / there is, you must record a current work first, of course.

    (1) close Illy and open again.

    (2) restart the computer (you can make up at least 5 times);

    (3) close Illy and press Ctrl + Alt + Shift / Cmd + Option + shift during startup (easy, but irreversible);

    4) move the folder (follow the link with this name) with closed Illy (more tedious but also more thorough and reversible), for CS3 - CC you can find the file here:

    https://helpx.Adobe.com/Illustrator/KB/preference-file-location-Illustrator.html

    5 look through and try the relevant among the other options (click on the link with that name, item 7) is a list of the usual suspects among other applications which can disturb and confuse Illy, point 15) applies to the maybe CS5, CS6 and CC);

    Even worse, you can:

    6 (A) uninstall (check the box to delete the preferences, if any), B) run the cleanup tool (if you have CS3/CS4/CS5/CS6/CC) and C) reinstall. It is important to use this step three way: otherwise, things may persist.

    http://www.Adobe.com/support/contact/cscleanertool.html

  • How to make the default visible bookmarks. response on Firefox Help "What happened to the bookmarks toolbar?" does not work.

    I want to have my favorites in the left pane of the default desktop, when I connect in firefox, as before. the solution proposed in the firefox help page "What happened to the bookmarks toolbar?", i.e. to check "bookmarks toolbar" in the drop-down display-toolbars menu, does not work.

    can you suggest an alternative?

    I use firefox on a macbookpro with os10.6.6 4.0b11

    The bookmarks toolbar has nothing to do with the Bookmarks Sidebar (on the left side of the browser window). {Ctrl + B} open/close the bookmarks bar. If you close Firefox with the open bookmarks bar, it should be open when you launch Firefox, next time. If it does not work like that in your profile file localstore.rdf file is probably damaged.

  • What happens if the previous owner of ipad forgotten their password and they are not original owner so that they do not have. their system crashed and they reset their device. so they just lost $ 300? It is NOT stolen or lost.

    What happens if the previous owner of ipad forgotten their password and they are not original owner so that they do not have. their system crashed and they reset their device. so they just lost $ 300? It is NOT stolen or lost.

    It requires the Apple ID and password from the previous owner. If you don't have it and can't get it, then the device is useless to you. Return it for a refund if you can.

    Find my iPhone Activation Lock

    Check in the future first before you buy second hand: How to check for Activation lock before buying a second hand iPhone.

    Find my iPhone Activation Lock

    Find my iPhone Activation Lock - remove a device from the account of the previous owner

  • What happens at the same time integrate codes if a user leaves their company and their CC license is cancelled?

    I run a small (two people) web company that uses CC. We are about to add an employee, so I turn to a business account and their setting up of a seat CC. From time to time this employee will develop Web sites that use Typekit fonts.

    If/when this employee left the company and its headquarters is cancelled, what happens to the embed code/TypeKit ID? It stay active to society or just disappear (screwing up policies of the sites that use them)?

    If the codes will go away, is there a simple way to keep track of which incorporate codes are used so that they can be implemented by someone else in the company?

    Thank you.

    Hi Jason,

    Thank you for your interest in Typekit. There will be no interruption to the police which serves for your websites if creative cloud of employee subscription ends. Remove a user from your Creative team subscription has no cloud automatically remove web fonts from Typekit kits; you would need to connect to the Typekit website and chose to delete the fonts as well.

    Typekit Support will be able to help you transfer these kits to another employee who has creative cloud or, if this isn't an option for some reason, convert the account Typekit a standalone subscription. (The stand-alone Typekit plan would be charged separately creative cloud; current subscription rates are available on our Web site: https://typekit.com/plans.)

    In both cases, write to us at [email protected] for more information when (if) you need to make these changes.  You can also feel free to contact us at this email with any other questions on the use of Typekit.

    I hope this helps!  Best,

    -liz

  • What happens when the space used hits space put into service?

    I work for the first time with VMWare software and everything while browsing the virtual machines, I saw that the space used was about to hit the space provided. I was doing some research on the definition of these 2 and I don't get a solid and reliable definition. Does anyone can say exactly what they are and explain what happens when the space used hits the space provided?

    Thank you

    Welcome to the community - Itsounds like your virtual drive are configured as thin provisioned - their size increases as disk space is consumed - when you hit provisioned used equal is a machine virtual will be error if it tries to use multiple disks FEPs - usually with a disk space error output - your options are to add more data stores and move virtual machines to the new data store.

  • What happens if the vCentre server fails

    We will have two hosts ESXi in a center of blade HP c7000 with a distributed vswitch

    The vCenter software will install a separate physical machine with the stroed in the database on our SQL2005 server again a separate physical host.

    A few questions on this configuration.

    1. what happens if the vCentre server loses the connection to the database server?

    2. what happens if the vCentre server loses the connection with the center of HP Blade?

    3. what happens if the vCentre loses the connection with the database server and the Server Blade HP?

    The biggest concern we have is if all the foregoing happen our system will fall, not being able to accessed from the main network, and since it will be the host of our messaging platform I'm eager to get this right.

    Thank you

    Kimble

    The configuration you describe will not let you take advantage of VMware HA because VMware HA will still work even if vCenter isn't up - so if the virtual hosting machine a vCenter runs in a HA cluster the VM resumes if the host it will run on fails.

    If you find this or any other answer useful please consider awarding points marking the answer correct or useful

Maybe you are looking for