CAN I BREAK A BRANCH IN CONNECT BY

Hi:
Suppose I have the following CONNECT BY query:
SELECT  FIELD1, FIELD2, LEVEL
FROM    A_TABLE
CONNECT BY PRIOR FIELD2 = FIELD1
START   WITH FIELD1     = 2
ORDER   BY FIELD1, FIELD2
/here is the table and data:
CREATE TABLE A_TABLE
  FIELD1  NUMBER,
  FIELD2 NUMBER
INSERT INTO A_TABLE VALUES(2, 4);
INSERT INTO A_TABLE VALUES(2, 8);
INSERT INTO A_TABLE VALUES(2, 12);
INSERT INTO A_TABLE VALUES(2, 16);
INSERT INTO A_TABLE VALUES(4, 5);
INSERT INTO A_TABLE VALUES(4, 7);
INSERT INTO A_TABLE VALUES(8, 9);
INSERT INTO A_TABLE VALUES(8, 11);
INSERT INTO A_TABLE VALUES(12, 13);
INSERT INTO A_TABLE VALUES(12, 16);The query produces:
    FIELD1     FIELD2      LEVEL
         2          4          1
         2          8          1
         2         12          1
         2         16          1
         4          5          2
         4          7          2
         8          9          2
         8         11          2
        12         13          2
        12         15          2Which in a branch display would be
  2
  |
  |--4
  |  |
  |  |--5
  |  |
  |  |--7
  |
  |--8
  |  |
  |  |--9
  |  |
  |  |--11
  |
  |
  |--12
  |  |
  |  |--13
  |  |
  |  |--15
  |
  |--16Suppose that when I issue this query, because 4 relates to some criteria that says not to show 4 or anything below it, is there any syntax I can use in the connect by to make skip the branch that starts at 4 and includes 5 and 7. Or do I write my query as follows?
SELECT  FIELD1, FIELD2, LEVEL
FROM    A_TABLE
WHERE   FIELD1 <> 4
AND     FIELD2 <> 4
CONNECT BY PRIOR FIELD2 = FIELD1
START   WITH FIELD1     = 2
ORDER   BY FIELD1, FIELD2
/Thanks for any help,
Thomas

select field1, field2, level
  from a_table
where field2 <> 4
connect by prior field2 = field1 and field1 <> 4
start with field1 = 2
  order by field1, field2;will prevent the branch into leaf 4 altogether (as opposed to branching and then having to filter later, which gets interesting if 4 has any grandchildren).
The field2 filter is still necessary to filter out the row that shows 4 as a child of 2.

Similar Messages

  • TS2756 How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )

    How can i create a new usb connection (service)  on my iMac for sharing internet from my iPhone5 ( i seem have to deleted it )
    i know its not a problem whit my carrier o data plan or sharing preferences on the ipone because when i use it un my laptop it works perfectly through
    the usb and even works on the Imac through wifi and bluethood tethering but NOT through usb!!.
    the problem is that trying to make it work i deleted the "profile" usb iphone on the network prefereces panel. Now i only have 3 options: ethernet / wifi / bluetooth
    but not the usb iPhone i used to have.
    And when i try to add a new one i dont get a USB option.
    can some one help me please??
    this is how it looks (after the bluetooth PAN i used to have USB iPhone option)

    The question would be more appropriate in the Mac forums as it is not really related to the iPhone.

  • Time Capsule can't backup external hard drives connected to it. Got that.

    Hello Apple Support Communities! This is my first post. Hope this finds you all well My first year as an Apple user. I bought a 2-Tb TC and am running my first backup to my MacBook as I write this.
    Problem statement: TC can't backup external hard drives connected directly to it, but the ones connected to the Macs that are connected wirelessly to it. Duly noted. However, the Spotlight will reindex the hard drives connected to the Mac and that will take hours; the whole backup will take days. Thus, excluding the hard drives at "System Preferences > Spotlight > Privacy tab" will probably help reduce the time of backup, or just ejecting them will do too. That itself has not proven effective coz it's still taking forever (50Gb in 2 days, still going).
    Questions:
    1) Do I wait until my first backup to my MacBook's internal hard drive is done before I connect my hard drives to my MacBook and attempt another backup? If yes, how do I go about the excessive time Spotlight reindexing takes if I intend to backup my hard drives connected to my MacBook?
    2) Is there any other way of speeding up the first-time backup?
    *Note: All versions of OS and firmwares are up-to-date. TC is connected to an external wireless router. TC is intended to be used as backup device and / or file server only.
    P/S: Apologee if this has already been discussed before, thus, a link to previous discussion thread would highly be appreciated)
    - Shook Hashem, Malaysia.

    How do I backup the externel hard drives connected to my MB. I was under the impression that that has already been done, because I've read it somewhere in a discussion that said it's done automatically unless I exclude it from a backup, which I didn't. So it's supposed to backup the external hard drivestoo because I had them connected to my MB the entire time during the backups.
    By default an external drive is excluded.. the list is odd.. if I plug a drive into the mac.. it immediately is listed as excluded.
    This is not the list of included.. this is the list of excluded.. remove it from the excluded list to include it.
    It is kind of reverse polish notation in backups.
    If I want to enter the Time Machine, should I enter it with the TM turned on or off?
    Not sure what the question means. If you use the star wars display and want to recover files then use TM off.. but read up pondini.. how to do restore etc.
    http://pondini.org/TM/FAQ.html
    15A in particular on the how to use TM.
    When do I uplug the ethernet and use the wireless connection instead?
    Once you have finished the main backup you can go back to wireless. The incremental backups are mostly very small.

  • Can I use my iPad to connect to a Mobile Access Server on a Mac mini ?

    I run a small business and am considering setting up an internal network. The online "features" description for Mobile Access Server (a component of Snow Leopard Server) says I can connect remoetley from an iPod or a Mac. The iPad is not mentioned. can I use my iPad to connect to a Mobile Access Server?

    Yes. It's the same as connecting from an iPod touch or iPhone.
    Logmeinigniton or teamviewer are a few of the apps you can use.
    Teamvewer has free app and you can see if it does what you want.

  • HT5437 How can I use apple TV to connect my computer to the tv screen as an external monitor?

    How can I use apple TV to connect my computer to the tv screen as an external monitor?

    Morning jotref,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    About AirPlay Mirroring in OS X Mountain Lion
    http://support.apple.com/kb/ht5404
    Best of luck,
    Mario

  • I have a macbook pro and use BT homehub 3.  can't work out how to connect my time capsule. can anyone help, thanks.

    I have a macbook pro and use BT homehub 3.  can't work out how to connect my time capsule. can anyone help?  thanks

    Just need to plug the TC in to the hub in bridge mode.. do not try and bridge the homehub.. it is not possible with the setup BT uses.
    To bridge the TC.. plug it directly into a computer by ethernet.. no other connection to the TC or the computer.
    Press and hold in reset until the front LED flashes rapidly.. about 10sec.
    Release the reset.
    Open the airport utility and setup the TC to bridge mode.
    The actual method depends on version of the OS and airport utility you use.
    This is version 5.
    Sorry I cannot post the v6 as I am on a snow leopard computer now. But you go to the network tab, and choose off bridge mode for method of connection. It will be NAT and dhcp by default.
    Then setup wireless.. you have a number of choices here.
    Either setup with the same SSID Security and password, as the homehub uses.. or a different name, and password..
    Each method works fine.. but you sometimes have issues with wireless channels.. for now leave it on auto and see what happens.. if you have issues lock down the radio channels on both devices.. use one out of the following on each, 1, 6, 11 or 13 in UK.. so say 6 on the homehub then 13 onthe TC.
    Update the TC.. unplug fromt the computer and plug it into the homehub.
    If you have other issues with the setup tell us what OS you run so we can post suitable screenshots.

  • Living in Japan and I'm an American who just signed up with Soft Bank the phone service here and spent a TON of money on an iPhone. I can't figure out how to connect my bank account at home to my app account so I can Skype my family. Please help!!!!

    Living in Japan and I'm an American who just signed up with Soft Bank the phone service here and spent a TON of money on an iPhone. I can't figure out how to connect my bank account at home to my app account so I can Skype my family. Please help!!!! I don't have a credit card nor do they gove debit cards to foreigners here, or at least it's really hard so I'm using my bank at home and still have a debit there. My phone number is 8 numbers plus the country code which is strange! Another thing is I was given a phone email that I was told to use for texting but I'm not sure how that works!! It's so frustrating too because no one speaks English here and I'm not very tech savvy. God bless you if you can help :)

    whichever app store you are connecting to, hyou need a credit card with an address in that country. Also, itunes gift cards must be in local currency too.
    If you are in japan, you need to use the japan app store

  • I'm stupid I think...Can't Figure out how to Connect my EZSkin Neck Strap

    Just got my new EZSkin case for my Nano and can't figure out how to connect the neck strap.
    Can anyone help a dummy?

    my neck strap is a 4mac and i have a skin on my nano on the back of the skin on the side there are 2 lil holes and i threaded the neck strap thro those, dont know if this will help.

  • Macbook pro keeps saying connection timeout, and it used to connect to the internet fine. what's up, why can't it find and automatically connect to the internet anymore???

    Macbook Pro keeps saying connection timeout and it used to connect to the internet fine. What's up, why can't it find and automatically connect to the internet anymore???

    Like this: https://discussions.apple.com/thread/2775868?tstart=0  ?

  • How can I get the ipad to connect to itunes 10.6.3?

    How can I get the ipad to connect to itunes 10.6.3?

    The iPad mini requires iTunes 10.7 or newer to sync.
    (82182)

  • Can someone tell me how to connect my iphone 4 to my TV ? many thanks I'm new to this 4

    Can someone tell me how to connect my iphone 4 to my TV ? Many thanks I'm new to all this

    http://store.apple.com/us/product/MC748ZM/A/apple-composite-av-cable?fnode=45
    for a wired connection you can use this, there is also the option for airplay if you have apple tv

  • I get a message the message " Can not get mail. Not connected to server" Yet I am connected with Wi-fi and can access all other websites. Can you advise? My iPad is only a month old!

    Has any one experienced not being able to send mail and only receiving some? I get the message " can not get mail. No connection to the server! " Yet I get some mail but can not send out any. My iPad is only 1 month old! It worked perfectly for about 10 days.
    Thx
    Agnes

    Hey agnesfromcopenhagen k,
    Thanks for the question. I understand you are experiencing issues with Mail on your iPad. The following resource provides some troubleshooting steps. What kind of account are you using? Some internet providers require that you be connected to your home Wi-Fi (or for work accounts, inside your corporate Wi-Fi/firewall). Also, some email accounts require two-step authentication. For more information, see this resource:
    iOS: Troubleshooting Mail
    http://support.apple.com/kb/TS3899
    Thanks,
    Matt M.

  • How can I tell the device is connected to itunes 12?

    how can I tell the device is connected to itunes 12?  I have Windows 8.  I hear that the device is connected, but don't see the device to manage.  Only thing that happens is on the phone it says Trust the computer..   I say Trust and nothing happens.

    in ituens at the top where you see the small icons for Music, Movies, TV etc when your device is connected you will see a small icon representing your phone or ipad etc popup click that and it will show you the usual interface for backup and syncing.
    if that doesnt happen, like it didint for me initially, you should close itunes fully via task manager if you know how to do this and start it again with the device unplugged then plug it in after itunes has finished loading.
    Worst case scenario you nee to resatrt

  • How can I know which clients are connected to my network through express and which are connected through extreme?

    I have an airport express extending, through wireless, a network provided by an airport extreme. How can I know which clients are connected to my network through express and which are connected through extreme?
    Here you can see both routers:
    I would expect to some clients connected to the express, other than the extreme. And that's all I see: only the airport extreme appears as client of the airport express.
    Below, one can see the summary of the config for both routers.
    Would somebody explain it?
    Thanks,
    Marcelo
    Message was edited by: Marcelão

    please disregard this answer.
    Message was edited by: Marcelão

  • I have a 1st gen time capsule. can I view what devises are connected to my network? if so, how

    i have a 1st gen time capsule. can I view what devises are connected to my network? if so, how

    Open the airport utility.
    Click on manual setup.
    Click on advanced.
    Click on Logs and Statistics.
    Click on Wireless Clients
    Voila!!

Maybe you are looking for

  • Freight Zone Modifier Requirements

    Hi Guru's, Oracle Applications : 11.5.10.2 Our business have a requirements that we should charge freight charges (Modifier in Pricing 11i ) based on some conditions. freight charge will be on line level, and can be 2%, x% and so on. This can be achi

  • Error in Crystal Report: Error in File ??:Missing or out-of-date export DLL

    Runtime user getting the following error when trying to create a PDF file from a Crystal Report. Where do I search on the machine for the necessary crystal export dll files? What are those file names? What version of those files should be on the mach

  • For Dr Stu as requested!

    Dear Group, i posed a query last week about a random re-boot issue and Dr Stu kindly asked me to post any error messages.  The computer has worked fine all week until a moment ago. Heres the BSOD message and any help you can give me in decyphering it

  • Critical Connection Key Help

    We've been using Contribute in our school district for over five years. Yesterday, out of the blue, we started getting reports from users about a message that "Contribute could not read the shared setting file for this website because the file has be

  • Corrupt Captivate 2 File

    Is there any way to recover a corrupt Captivate 2 file? Could renaming the file via file manager have caused the corruption? Luckily the file was a test demo so it is not a huge loss, but I would like to avoid this in the future if possible. Thanks!