Connect by prior need help

Hi all,
Im having two tables like as following,
menu_roles : Table Name
MENU_ID     ROLE           REGION          SEGMENT     PERSON_ID      ENABLED_FLAG
13     -          -          -          31766     Y
27     Account Manager     -          -     -                Y
29     Account Manager     -          -     -          
1     Account Manager     -          -          -               Y
2     Account Manager     SOUTH          -          -               Y
2     COO          EAST          Corporate     31547               Y
12     -          -          '          31766          Y
Menu_master : Table Name
MENU_ID     MENU_NAME     MENU_PARENT_ID     RANK      MENU_LEVEL     ENABLED_FLAG     DELETE_FLAG
1     T_Folder1          1     0     Y      N
2     T_Folder2          2 0 Y     N
3     T_SubItem1.1     1 2     1     Y     N
4     T_SubItem1.2     1     1     1     Y      N
5     T_SubItem1.1.1     3          2     Y     N
6     T_SubItem1.1.2     3     1 2     Y     N
7     T_SubItem1.1.1.1     5     1     3     Y     Y
7     T_SubItem2.1     2          1     Y     N
i need the result like the following
MENU_ID     MENU_NAME     MENU_PARENT_ID     RANK     MENU_LEVEL
1     T_Folder1               1     0
4     T_SubItem1.2          1     1     1
8     T_SubItem1.2.1          4     2     2
3     T_SubItem1.1          1     2     1
6     T_SubItem1.1.2          3     1      2
5     T_SubItem1.1.1          3          2
Im using the query like as
pergrpid := 791.
WITH T AS
(select mas.menu_id,
mas.menu_name,
mas.url,
mas.apex_page_no,
mas.menu_parent_id,
mas.rank,
mas.menu_level
from sfa_menu_master mas
where mas.enabled_flag = 'Y'
and nvl(mas.delete_flag, 'N') = 'N'
connect by prior mas.menu_id = mas.menu_parent_id
start with menu_id in
(select menu_id
from sfa_menu_roles rol
where (rol.role in
(select max(role)
from sfa_per_groups grp
where grp.per_group_id = pergrpid) or
rol.region in
(select region
from sfa_per_groups grp
where grp.per_group_id = pergrpid) or rol.region = null or
rol.person_id = null))
order siblings by rank)
select * from t;
but i want to check role , region ,segment , personid,
if i give role,region, segment mean i want to check three conditions
if i give only role and region mean want to check that 2 conditions only
if i give role alone mean i have to check 1 conditions alone
if i give personid mean i have to check personid
awaiting for the reply.
Thanks in Advance,
839083 .

A "parent" without a child will not show up as a parent, but it may show up as a child.
When that happens, CONNECT_BY_ISLEAF will be 1.
So, filter on CONNECT_BY_ISLEAF = 0.select empno, ename, job, mgr from scott.emp
where connect_by_isleaf = 0
start with mgr is null
connect by mgr = prior empno;
     EMPNO ENAME      JOB              MGR
      7839 KING       PRESIDENT           
      7566 JONES      MANAGER         7839
      7788 SCOTT      ANALYST         7566
      7902 FORD       ANALYST         7566
      7698 BLAKE      MANAGER         7839
      7782 CLARK      MANAGER         7839Edited by: Stew Ashton on Jan 17, 2013 1:34 PM

Similar Messages

  • Datasource connection with jboss, need help

    Hi friends,
    I am doing data source connection through Jboss (jboss-4.0.2) with mysql database. I am using java(j2sdk1.4.2_04). I have made all changes given in this link -- http://community.jboss.org/wiki/SetUpAMysqlDatasource
    After making changes I restart jboss properly, but when I am going to attempt to connection through class. it give following error.
    1.ERROR! Shared library ioser12 could not be found.
    Can't find SerialContextProvider
    When a create a diffrent new class, then give me this error.
    2. ERROR! Shared library ioser12 could not be found.
    Cannot get connection: javax.naming.CommunicationException: Can't find SerialContextProvider
    Kindly help me out for this problem.
    Thanks
    Abhishek Jain

    user13428037 wrote:
    ,,, JBoss ... give following error.
    1.ERROR! Shared library ioser12 could not be found.
    Can't find SerialContextProvider
    When a create a diffrent new class, then give me this error.
    2. ERROR! Shared library ioser12 could not be found.
    Cannot get connection: javax.naming.CommunicationException: Can't find SerialContextProviderPlease don't crosspost http://www.javaprogrammingforums.com/jdbc-databases/6353-datsource-connection-mysql-need-help.html#post22533
    The
    ERROR! Shared library ioser12 could not be found.error message has nothing to do with you adding a datasource.
    It would happen even before you made the datasource configuration changes.
    Looks like you added a j2ee.jar to the JBoss classpath.

  • Reset router, can't connect to net - need help

    Here's my situation, I spent an hour digging through previous posts trying to solve my issue with no luck.
    Had Cavtel DSL running to a Linksys wrt54g ver.2 router which was working fine.  My brother needed access to the network but we forgot the password which was set about 2 years before. 
    I hit the reset button on the back of the linksys router and promptly lost access to the internet from my computer.
    I contacted linksys help over the phone and after dealing with someone in India he told me that they would charge me to walk me through it.  I disconnected and tried cavtel... They told me to plug the cavtel modem directly to the pc.  I still couldn't access the internet at this point.
    She then had me modify my tcp/ip settings and gave me nifty numbers that allowed me to get back online.  I asked her about the router and she said, oh just plug the modem into it and it will self detect everything and emphasized that I should call linksys and they'll be GLAD to help me out...
    Needless to say, I plugged the internet into the router and once again can't get online.  I then tried to backtrack and plug the pc back directly to the modem and can't connect to the internet once more.  Contacted cavtel and their response was the classic, well we got you working directly we can't help you with router issues.
    I don't have the install cd anymore, and I haven't a clue what to do to fix this.  Top this off, there are no other wireless networks around my house so I can't access this forum from home or any online 'easy help' tools or programs.
    Anyone have any suggestions???  And yes I know the basics of accessing the modem, the 192.168.1.1 etc etc admin password. 
    Thanks for help in advance.
    Message Edited by seawolf688 on 06-11-2008 09:00 AM

    Configuration for DSL connection:-
    Before doing the following steps, you have to connect the modem to the
    router's Internet Port and the computer to the Ethernet Port Number 1.
    1. Press and hold the reset button for 30 seconds.
    2. Then, unplug the power keep holding down the reset button for
    another 30 Seconds.
    3. Plug back the power back in, and keep holding down the reset button
    for 30 Seconds.
    4. Release the reset button.
    ===================================================================
    Access the setup page of the router by launching an
    Browser and type on the address bar, 192.168.1.1 and press enter. When
    it prompts for the username and password, leave the username field
    empty and provide password as "admin" (Without quotes)
    click on ok.
    On the main setup page the ""Internet Connection Type"" should be
    on ""Obtain IP Automatically - DHCP ?. Click on the Save Settings
    button.
    Now click on the sub tab ""MAC address clone"".
    - Click on enable
    Click Clone & click save settings
    Check WAN Ip on Status page of router ....
    If getting Valid Ip .... try going online
    If not ... power cycle for 4-5 minutes & then agian check the WAN Ip address .....

  • Connection dropping. Need help please.

    I have tried everything that In have seen in the forum related to this problem. The only thing not done is un-clicking the option to connect to BT Openzone if in range which seems to be in Communication Settings. Is this on my Laptop or within the hub settings. Please help if you can. Thanks, len.

    Hi yes you can deselect Openzone from your pc and reset it when you go out however the problem with your hub losing connection needs resolving and I suggest you try the following link Here is a basic guide to getting help from the community members done by CL Keith Please read through the link posted http://forumhelp.dyndns.info/speed/first_steps.html
    once you have posted the information asked for then the community members can help you more
    Thank You
    This is a customer to customer self help forum the only BT presence here are the forum moderators
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

  • Connection Trouble I NEED HELP!!!!

    i had an Linksys WRT54GS and this wireless is connected to a switch in an internal enviroment but i want connect guest users without them see my internal network and can't access to any internal server....how can i configure this?
    Please!!! i need extremely help

    I believe there's no option for this router to have a guest network. The router can only broadcast one network and all computers/devices connected to it can have access to your internal server. You may want to consider another router though that has a guest access feature. That way, all the devices connected to the guest network will be on a different IP range compared to the main network. They will just have an access to the internet but won't have any access to the internal server. You may check linksys's website to check those routers that has a guest access feature: http://homesupport.cisco.com.

  • BIOS doesnt recognize SATA connected Hard Drive- need help flashing bios from bootable USB

    hi
    I have an envy laptop running InsydeH20 bios rev f14.
    the bios doesn't recognize the internally connected hdd/ssd.
    I have heard that with insyde bios', sometimes you have to unlock 'secret capabilities' to recognize hardware incl internal hdd.
    but I am just trying to reflash my bios.
    the problem is that I cant get into windows because it doesn't recognize my hard drive and windows doesn't allow insallation to usb connected drives.
    I downloaded the patch from hp.com for my product and it actually has an option for making a bootable USB for use on the actual system, and I did this. the instructions are to just restart my computer with the bootable usb. I have tried Legacy support on and off, neither updates bios.
    I highly doubt it has anything to do with the physical sata connector.
    basically I need to flash my bios from bootable usb. I have done some research about making a bootable dos usb etc etc but I don't know what program to even run and how..
    this is a link to my product:
    http://h10025.www1.hp.com/ewfrf/wc/product?cc=ca&dlc=en&lc=en&os=4132&product=5400031&sw_lang=
    Pleeeeeaaseee someone help!!!!!!!!!!!!!!!!!!
    Thanks!!

    hi
    I need to flash the bios of my system. the bios is not recognizing hardware and cannot boot into windows to run the bios flash for windows.
    on my other comp I ran the bios update patch and chose ' install to bootable usb ' so that I could use it on my system.
    cannot run on my laptop. tried booting from the media. tried allowing 'legacy' compatibility.
    im running insydeH2O rev f14 right now.
    here is a link to my system:
    http://h10025.www1.hp.com/ewfrf/wc/product?cc=ca&dlc=en&lc=en&os=4132&product=5400031&sw_lang=
    thanks to anyone who can help!!!!!!!!!!!!!!

  • Wireless Connection Problems! Need Help...

    Hi everyone, just to say I'm not a PC wizard of any kind so kinda need simple instructions
    I've just bought an MSI AE1900 & a Belkin 'N' Wireless Router but cannot get the PC to connect to the router even with the routers CD.
    When I try to connect by clicking on the available wireless networks (The MAC Address from this PC has been added to my router) it Say's Windows was unable to find a certificate to log you onto the router.
    And even if I try to connect using the set up assistant disk that came with the router it Say's The setup assistant is not able to connect to the router via any of the network adapters in this computer.
    Anyone have any idea's or am I going to find out that I need to buy a new router as this PC's WLAN adapters aren't compatible with the Belkin 'N'?

    Hello,
    Your question may be better answered by contacting TAC: http://www.cisco.com/en/US/support/tsd_cisco_worldwide_contacts.html if you have a service contract or by visiting the NetPro forums http://forum.cisco.com/eforum/servlet/NetProf?page=main
    Thank You.

  • ITunes wont connect to the internet, connection refused. Need help

    I have no idea what settings were moved on my laptop, but now everytime i open itunes and i try to connect to the itunes store, it shows the message:
    "ITUNES COULD NOT CONNECT TO THE ITUNES STORE. THE NETWORK CONNECTION WAS REFUSED.
    Make sure your network settings are correct and your network connection is active, then try again"
    I've tried a lot of stuff in the configuration and in the firewall settings, repairing the software..... and nothing. Can anyone help me please?

    Try:
    iTunes: Advanced iTunes Store troubleshooting
    Cannot connect to the iTunes Store because of an unknown error (-42408)

  • Problem with 8900 Browser connecting... need help

    I have a who has a 8900 and is using digicel jamaica for service. 
    She is able to make and receive calls.  She can receive emails but unable to get her blackberry browser to connect.  This service was working fine until this past friday.  Now she did mention someone else's email is on the phone but customer service could not remove that person until they called.  Not sure I understand that part.  We have tried the following:
    1.  Battery pull
    2.  Checked APN settings and tried:
    APN:web.digiceljamaica.com
    Username: blank
    Password: blank
    and..
    APN: web.digiceljamaica.com
    User: wapuser
    Password: wap03jam
    3.  She is not sure if they recently sent any new service books.
    4.  She spoke to her customer service and stated her account is properly provisioned. 
    5.  Her wifi is on but she is not connected to any local network.
    6.  We checked her browser version and she has 4.6.1.250. 
    At this point, I am stuck.  Any insight or ideas that I can try?  She gets unable to connect when she tries to use her blackberry browser. 

    Unfortunately, if you have not enough knowledge about using Flash, and do not want to pay to have this done for you, the folks who did this for you are likely going to be the only ones who can help you resolve it.  They should be able to provide the edited fla and the new swf if they are in any way a credible/reliable business.... which at this point sounds like they are not.

  • Port/Connection Routing through Share Internet Connection...need help

    Alright here's the situation: I have a Linux server that I bought for cheap from a friend and its upstairs in my bedroom. The router and dsl is downstairs and the server has to stay up in the bedroom. I don't have the cabling to run all the way up and thats tacky anyway. And linux doesnt have wireless support for my wireless card. Sooo I've turned on connection sharing with my new iMac that is in the bedroom as well and internet is coming through airport, while the connection shared with the server is wired. In airport, out eth0 to server.
    Ok, so what I'm wanting to do is experiment with multiple types of servers on linux (i.e. Samba, FTP, Mail, etc) but I need to figure out a quick fix on routing or forwarding those connections routes and ports through the mac to the linux box. The linux box has no problem reaching the internet and has its own static ip but is also showing up on network 192.168.0 when the rest of my network is 192.168.1
    Any third party free programs for adding advanced routing or easier setup and more features to the OSX internet sharing? Or maybe a tweak ya'll know of?

    Hi Aaron,
    flying buttress is a GUI for the UNIX firewall built into OSX. It has more functionality than the GUI in the sharing preferences.
    By sharing network connection from another mac it will be on a differnent subnet to the rest of your LAN. The mac that is setup as the gateway is effectively acting as a gateway like your router is. So therefore your linux box is behind 2 NAT devices. You would need to setup up 2 sets of NAT rules.
    This is quite an advanced setup for someone just experimenting.
    I don't have the cabling to run all the way up and thats tacky anyway. And linux doesnt have wireless support for my wireless card.
    Cable does not have to look tacky. It can be installed neatly if use use conduit or tack it to the skirting board. Also given that wireless cars cost about £20 you could easily get your linux box connected to your router.

  • Two PC's Connected to WRT54G -Need Help With File Sharing Folder

    Hi,
    I have both PC's connected to the WRT54G with internet access on.  How do I create file sharing and or a folder named "shared" on each desktop that allows each PC to drop files in this folder so that each PC can open and access those files?
    Jerry

    For File and Printer Sharing follow this link

  • TS1363 my ipad is disabled its not showing key pad and not connecting with itunes need help

    ipad is disabled and not connecting with itunes

    1: Connect the device to your computer and open iTunes.
    2: If the device appears in iTunes, select and click Restore on the Summary pane.
    3: If the device doesn't appear in iTunes, try using the steps in this article to force the device into recovery mode.

  • Camera connection...need help!

    my computer won't recognize my camera when it is connected. i updated all my software...even the software i have for my camera. it still wont work, and its a brand new camera. how can i fix this problem???
    Message was edited by: lovinlucy

    lovinlucy, Welcome to the discussion area!
    Please provide more details.
    What type of camera? still photo or video?
    How are you connecting it to your Mac? USB, FireWire, etc.?
    What is the brand and model # of the camera?

  • Went through wash and kinda got a connection... need help plz

    ya... so it went through my wash
    and now it shows as "usb device not recognize"... i want to format it but it doesnt show up on "my computer"
    any ideas??

    If your computer can't see it you can't format it. Have you tried forcing it into disk mode? http://docs.info.apple.com/article.html?artnum=93651
    If you do this and your computer can see it, right click on the iPod, select disk management and format it (FAT32, not a quick format) then Restore it in iTunes.

  • HT4623 my iphone justsays connect  to iphones need help

    same

    Hi ashfaque2290,
    Welcome to Apple Support Communities.
    This article on our support site is the best starting point for troubleshooting the issue you're encountering:
    iOS: Unable to update or restore
    http://support.apple.com/kb/ht1808
    Cheers,
    Jeremy

Maybe you are looking for

  • Incorrect Number error message only started today ...

    Hi there Had my N900 since July and this is first time I have had major problem.. Really weird...I text my wife everyday and have been doing so today as well..but within the last half hour, when I try to SMS her, I get an "Incorrect Number" error mes

  • ATV doesn't recognize iPhoto Library

    Using iTunes to sync by choosing my iPhoto Library doesn't work as the iPhoto Library is dark and can't be chosen.  Also ATV doesn't recognize my iPhoto library which is how I realized I had a problem.  All other functiondsof ATV work fine; i.e. movi

  • Invoices in Java

    How to implement software in Java being able to create and print invoices?? Are there any free libraries??

  • SONY Bloggie MHS-TS20 install issue

    I bought a SONY Bloggie Touch MHS-TS20 and am trying to launch the software. I get so far as installing it and says 'starting', but then i get directed to a google chrome page that says: " oops! google chrome could not connect to localhost:2468" then

  • 60 GB Ipod will turn on then turn off

    I have a 60 GB Video Ipod, about 2 weeks old. About two days ago i tried to turn it on and it would start up normal, show the screen with just the apple like its loading, but then it would just light up and shut down, making a little noise. It then r