s check if there is relationship with ancestral

Hello

I have a charly

SQL> with parent_child as (
  2  select null parent_,  '1' child_ from dual union all
  3  select   '1',  '02' from dual union all
  4  select   '1',  '03' from dual union all
  5  select   '1',  '04' from dual union all
  6  select   '1',  '03A' from dual union all
  7  select  '03', '05' from dual union all
  8  select  '03', '03A' from dual union all
  9  select  '03A', '03B' from dual union all
 10  select  '03A', '03C' from dual union all
 11  select  '03A', '03D' from dual union all
 12  select  '05','06' from dual union all
 13  select  '05','07' from dual union all
 14  select  '07','08'  from dual union all
 15  select  '07','09'  from dual union all
 16  select  '09','10'  from dual union all
 17  select  '03', '11' from dual union all
 18  select  '03', '12' from dual union all
 19  select '12','13' from dual union all
 20  select '12','14' from dual union all
 21  select  null,   '15' from dual union all
 22  select   '15',  '16' from dual union all
 23  select   '15',  '17' from dual union all
 24  select   '15',  '18' from dual union all
 25  select  '18', '19' from dual union all
 26  select  '18', '19' from dual union all
 27  select  '18', '19' from dual )
 28  select parent_,child_, connect_by_root parent_ raiz ,level, sys_connect_by_path(parent_||'=>'||child_,',')
 29    from parent_child
 30    connect by nocycle parent_ =prior child_
 31    start with parent_ is null;
        1                    1 ,=>1
1       02                   2 ,=>1,1=>02
1       03                   2 ,=>1,1=>03
03      03A                  3 ,=>1,1=>03,03=>03A
03A     03B                  4 ,=>1,1=>03,03=>03A,03A=>03B
03A     03C                  4 ,=>1,1=>03,03=>03A,03A=>03C
03A     03D                  4 ,=>1,1=>03,03=>03A,03A=>03D
03      05                   3 ,=>1,1=>03,03=>05
05      06                   4 ,=>1,1=>03,03=>05,05=>06
05      07                   4 ,=>1,1=>03,03=>05,05=>07
07      08                   5 ,=>1,1=>03,03=>05,05=>07,07=>08
07      09                   5 ,=>1,1=>03,03=>05,05=>07,07=>09
09      10                   6 ,=>1,1=>03,03=>05,05=>07,07=>09,09=>10
03      11                   3 ,=>1,1=>03,03=>11
03      12                   3 ,=>1,1=>03,03=>12
12      13                   4 ,=>1,1=>03,03=>12,12=>13
12      14                   4 ,=>1,1=>03,03=>12,12=>14
1       03A                  2 ,=>1,1=>03A
03A     03B                  3 ,=>1,1=>03A,03A=>03B
03A     03C                  3 ,=>1,1=>03A,03A=>03C
03A     03D                  3 ,=>1,1=>03A,03A=>03D
1       04                   2 ,=>1,1=>04
        15                   1 ,=>15
15      16                   2 ,=>15,15=>16
15      17                   2 ,=>15,15=>17
15      18                   2 ,=>15,15=>18
18      19                   3 ,=>15,15=>18,18=>19
18      19                   3 ,=>15,15=>18,18=>19
18      19                   3 ,=>15,15=>18,18=>19
 
29 rows selected

I have to save in other table records alone with the father of the great father relationship... .etc

Example: 1. have child

02

03

03 A

04

02 AND 04 HAVE NO CHILDREN

03 HAVE A NŒUDS (CHILD) 03A, 05-11-12

05, 11 AND 12 are not child' while I must consider only 03a

03a having child 03, b 03C, 03D, but none is child of the 03 and 01

THEN I just save my files single table (parent_b, child_b)

01 > 03

03 > 03a

How can I do?

using

Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production
PL/SQL Release 11.2.0.4.0 - Production

You have indexes on (pai, filho)?

CREATE or REPLACE TYPE ty_tmp_d4 () AS OBJECT
LVL NUMBER
NUMBER of pai
filho NUMBER
, caminho VARCHAR2 (4000)
)
/

CREATE or REPLACE TYPE ty_tmp_d4_tbl AS TABLE OF THE ty_tmp_d4
/

DECLARE
d ty_tmp_d4_tbl;
D2 ty_tmp_d4_tbl;
BEGIN
Ty_tmp_d4 SELECT (1, pai, filho, pai |'|) ' || Filho)
LOOSE COLLECTION d
OF tmp_d4
WHERE the pai = 1;

WHILE SQL % LOOP
Ty_tmp_d4 SELECT (d.lvl + 1, tmp_d4.pai, tmp_d4.filho, d.caminho: ' |'| tmp_d4.) Filho)
COLLECTION in BULK IN d2
TABLE (d) d, tmp_d4
, table (cast (multiset (select REGEXP_SUBSTR (d.caminho, "[^ |]")))) +', 1, LEVEL)
of the double
connect by level<=>
)
as sys.odcinumberlist)
) x, tmp_d4 d5
WHERE d.filho = tmp_d4.pai
AND X.COLUMN_VALUE = d5.pai
AND tmp_d4.filho = d5.filho
GROUP BY tmp_d4.pai, tmp_d4.filho, d.caminho, d.lvl
WITH = d.lvl of COUNT (*);
WHEN THE OUTPUT SQL % NOTFOUND;
d: = d2;
END LOOP;
I'm IN 1.d.COUNT LOOP
DBMS_OUTPUT. Put_line (d (i). Caminho);
END LOOP;
END;
/

Tags: Database

Similar Questions

  • Hi, I have a notice popping up whenever I sign in PS, saying that there is something with my payment info... I check with my card and the Bank and everything is ok on my end - I don't want to change my credit card info want to use this one to one

    Hi, I have a notice popping up whenever I sign in PS, saying that there is something with my payment info... I check with my card and the Bank and everything is ok on my end - I won't change my credit info card wants to use it at all times, was spotted or something and how can I get this fixed will, my next payment as planned intake and ignores the message? I wish I had this problem so I don't have an interruption in my service?

    Payment of 10 October 2015 has been denied 3 times as a result activation server has been informing you. Payment has been successful on October 30, 2015, the CC is active, you can ignore these guests, they must die now.

    Concerning

    Stéphane

  • Is there a fault with upgrade 2.13.121 for the interface Adobe Creative Cloud? I want to check the updates of the program and update freezes at 5% - I have now tried 6 to 8 times to + 5 min once - it's over half an hour of my life!

    Is there a fault with upgrade 2.13.121 for the interface Adobe Creative Cloud? I want to check the updates of the program and update freezes at 5% - I have now tried 6 to 8 times to + 5 min once - it's over half an hour of my life!

    Hi David,

    Please check the help below document:

    https://helpx.Adobe.com/creative-cloud/KB/Error_Code_2_failed_update.html

    Kind regards

    Sheena

  • I have some 3rd party widgets I want to use with Muse. When I try to import this Muse gives an error: 276 (number of unexpected format. Check if there is a newer version of Muse). My current version of the Muse is v7.4 please guide properly.

    I have some 3rd party widgets I want to use with Muse. When I try to import this Muse gives an error: 276 (number of unexpected format. Check if there is a newer version of Muse). My current version of the Muse is v7.4

    Please guide properly.

    I use a 64-bit computer. I discovered the widgets were not made for earlier versions such as v7.4 had no 'library' to import these widgets to.

    Thanks for the reply but. I appreciate it.

  • Thanks for the update of Firefox 4. Here is my concern - previously, the option "Search for updates" is located under the Help menu. In Firefox 4, I can't find this option; How will we be able to check if there are updates available?

    Previously, the "Find updates" option is located under the Help menu. In Firefox 4, I can't find this option; How will we be able to check if there are updates available?

    Can this new version to update automatically? How to set this option?

    Click the Firefox button, click Help, click on Firefox, there is a control for the button updates on this screen.

    Other issues that need your attention

    The information provided with your question indicates you have outdated plugins with known security and stability issues that need to be updated. To see the plugins submitted with your question, click on "+ system details...". "to the right of your original message of the question. You can also see your plugins in the Firefox menu Tools > Modules > Plugins.

    • Adobe Shockwave for Director Netscape plug-in, version 11.5

      • Several security updates behind
    • Adobe PDF plugin for Firefox and Netscape
      • Seems to be an older version
    • Shockwave Flash 10.2 r152
      • 10.2 r153 recently released security update
    • Next-generation Java plug-in for the Mozilla browsers 1.6.0_15
      • 9 updates behind
    1. Check your plugin versions on one of the following links:

    2. Update to Shockwave for Director
      • NOTE: this is not the same thing as Shockwave Flash; This installs the Shockwave Player.
      • Use Firefox to download and SAVE the installer to your hard drive from the link in the article below (Desktop is a good place, so you can find it).
      • When the download is complete, exit Firefox (file > exit)
      • Locate and double-click it in the installer that you just downloaded, let the complete installation.
      • Restart Firefox, and look at your plugins.
      • Download link and more information: http://support.mozilla.com/en-US/kb/Using+the+Shockwave+plugin+with+Firefox
    3. Update of Adobe Reader (PDF plugin):
      • Within your existing Adobe (If you have already installed) drive:

    • Open the Adobe Reader program in your list of programs
    • Click Help > check for updates
    • Follow the instructions to update
    • If this method works for you, go to the section "download full installer ' below and go to"after the installation"below
  • Download the full installer (If you have NOT installed Adobe Reader):
    • "Use the links below in order to avoid the painful' getplus" Adobe Download Manager and other 'extras' you do not want
    • Use Firefox to download and SAVE the installer to your hard drive for the appropriate link below
    • Click "save to file"; Save to your desktop (so you can find it)
    • Once the download is complete, close Firefox
    • Click on the installation program, you just downloaded and allow installation to continue
      • Note: Vista and Win7 users need to right click on the installer and choose "Run as Administrator"
    • Download link: ftp://ftp.adobe.com/pub/adobe/reader/
      • Choose your operating system
      • Choose the latest version of # .x (example 9.x for version 9)
      • Choose the version the most recent number
        • NOTE: 10.x is the new Adobe Reader X (Windows and Mac only from this announcement)
      • Choose your language
      • Download the file, save it to your hard drive, when finished, close Firefox, click on the installation program you just downloaded and let it install.
      • Windows: click on the .exe file. Mac: click on the .dmg file
  • Using one of the links below will force you to install the "getPlus" Adobe Download Manager
  • . Also don't forget to uncheck the McAfee scanner if you do not want the link force installed on your desktop computer
  • After installation, launch Firefox and recheck your version.
  • Update the Flash plugin to the latest version.
    • Download and SAVE to your desktop, so you can find the Setup program later
    • If you do not have the current version, click on the "Player Download Center" link on the 'download and information' or 'Download manual installers' below
    • Once the download is complete, exit Firefox
    • Click on the installer, you just download and install
      • Windows 7 and Vista: will need to right click on the installer and choose 'run as administrator '.
    • Launch Firefox and recheck your version or up to the download link below to test the installation
    • Download and information: http://www.adobe.com/software/flash/about/
      • Use Firefox to go to the site above to update the Firefox plugin (will also install the plugin for most other browsers, except IE)
      • Use IE to go to the site above to update the ActiveX to IE
    • Download manual installers.
  • Update the Java plugin to the latest version.

  • See also "Manual Update" in this article for update from the Java Control Panel in Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
  • Removal of older versions (if required): http://www.java.com/en/download/faq/remove_olderversions.xml
  • Remove several extensions of Console Java (if necessary): _ http://kb.mozillazine.org/Firefox: _FAQs_:_Install_Java #Multiple_Java_Console_extensions
  • Java test: http://www.java.com/en/download/help/testvm.xml
  • No boot from CD - how to check if there is a BIOS problem?

    I have search in the forum and almost everything it has been proposed to solve the problem but have not yet checked.

    I have a Toshiba Staellite m40 - 230 SP and there are a few days, I was forced to change my CD/DVD drive, because the original one doesn't work anymore. (As a recommendation of the shop after having shown my last drive), I bought a Sony AD - 7580A ID. I inserted into the laptop and tested several times in Windows O.S. with no problem at all.

    The problem appeared when you try to start on a CD in order to update the OS it is not possible to boot from any CD or DVD!

    That's all what I already checked:
    Bq. - CD player tested within the bone several times while reading and recording media. It worked correctly. \\-Change the order of precedence of the BIOS to check first the CD-ROM. Did not work. \\-Essaye also by pressing 'C' or F12 at startup to force to check the CD. Did not work. \\-Verifie that when you start, the laptop seems to try to check if there is a CD in the drive (we see a green light and the sound of verification), but in the end behaves as if there were not a CD inside or it is not bootable. \\-UN of the tested CD was a Linux distribution downloaded from its homepage and verified through MD5 and properly followed the instructions for registration (and checked in an another lapto when there was no problem) \\-essaye several other CD/DVD that have been tested in other PC where they made the system startup from the CD correctly. None of these disc worked in my laptop. Tried \\-j'ai as original Toshiba Recovery DVD and it did not work \\-essaye F8 to end somewhere in the force to check the CD. Nothing there. \\-Change CD player with another one (an LG) that works fine in another laptop. But not in mine. \\-Retire the HARD drive and tried to boot from the CD to detect if there is a confusion between them to the point of BIOS that detect both as primary IDE. It did not work. BIOS \\-configuration modified by default with the priority of the sequence set to CD-ROM first. Did not work. \\-AUCUN boot USB is possible because my BIOS does not allow this option. \\-Courrier sent to Sony and Toshiba support so weather found this CD player is compatible with my computer laptop or not, but received no response at all. \\-MIS updated the BIOS from /KBC ACPI BIOS version 1.30 / 1.05.42 version 1.70 /1.05.47. Did not work.
    I am of ideas right now and don't know what else to check. Could you please help me? any idea?
    I have the bios on this laptop is really simple and there is no place where I can check if it is to recognize the new CD player.

    Any help will be highly appreciated it.

    Kind regards

    Teresa

    At first, I have to say that I m not a technician and cannot say for sure what the problem is here but I have a few suspicions about all of this.
    As you know laptop manufacturers use only compatible hardware components and test the functionality of the laptop computer in general.
    For each laptop model Toshiba offer a list with compatible optical disc players that can and should be used on some laptop model. This list is in document s user manuals.

    According to this document, you can use follow the sides:
    Toshiba - Samsung SD-C2712
    -Matsu * a UJDA760
    -Toshiba Samsung TS-L462A
    -TEAC DW-224TH
    -Pioneer DVR-K15TBT
    -Toshiba Samsung TS-L632A
    -Matsu * a UJ - 830B
    -Matsu * a UJ-831BT-A
    TEAC - W28E-xxx

    As you can see that this Sony isn't on the list and I guess that there must be a compatibility problem.
    All listed optical disc drives are tested and will work as a boot device.

  • Checking the status of communication with NI DAQmx or NI6143

    Hello world
     
    I'm working on checking the status of communication with NI DAQmx or NI6143 in Microsoft Visual Studio 6.0 C++ on Windows XP. The communication situation is checked between the DLL and the NOR-DAQmx/NI6143. I wonder what is the command for the control of communication for NI DAQmx or NI6143, and if there is no code available. Any suggestion or advice is greatly appreciated.

    Thanks in advance.

    There are many examples available on your computer that install with NI DAQmx. For examples in C/C++, follow the steps listed in this white paper:

    http://www.NI.com/white-paper/6999/en

    If you are new to data acquisition, that I suggest using LabVIEW. LabVIEW has several examples to begin to use a data acquisition equipment. To find them, open LabVIEW and select help > find examples... > Input and Output material > DAQmx.

    As a note of clarification, NI DAQmx is the driver used to communicate with your device (NI 6143). You do not communicate with OR-DAQmx itself, but use it to send commands and receive data from your device.

    Cameron T

  • Is there a problem with the server of Combat Flight Simulator 3?

    Is there a problem with the server of Combat Flight Simulator 3? I can play online because I can connect to the internet.

    I have READ 651,2 Kbps. someone helpme?

    Hi Roy sanchez,

    Thank you for using Vista answers Forum.

    What happens when you try to play?

    Here is a link to a few known issues with Combat Flight Sim:

    http://support.Microsoft.com/kb/331570

    I'm not sure of CFS, but most of the game servers are hosted by the players.
    You can check with your preferred server host to see if they are experiencing problems.

    Please let us know if that helps.

    Chris
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Someone contact me on my account. If this isn't the case, then I'll finish my 20 + years of relationship with msn.

    I can't find my account information. I want to change the payment of billing. You have made it difficult to get in to my personal account information. I want satisfaction soon or I'll finish my 20 + years of relationship with msn.

    Hello

    I suggest you to click on the link provided below MSN support and check if it helps

    https://support.MSN.com/default.aspx?WA=wsignin1.0&St=1&wfxredirect=1

    Also, refer to the article below:

    How to contact MSN customer service

    http://support.Microsoft.com/kb/940784

    Hope this helps,

  • Cannot install Vista service pack 2 is 800f0a09 error code with the message that there are problems with the driver for dell latitude

    Original title: why I get error code 800f0a09 to upgrade to windows vista service pack 2

    I have a laptop del that is running on Windows Vista Edition Home Premium. I tried to download itunes but it requires service pack 2. Whenever I try to update to service pack 2, I get the message following error code 800F0A09. He also mentioned problems with the driver for dell latitude. What can I do to fix this please.

    Thank you

    Hello

    Please join Microsoft Community where you can find the necessary information on Microsoft products!

    You can not install Vista Service pack 2 and get the error with code 800f0a09 and the message that there are problems with the driver for dell latitude.

    The problem may occur if some of the components of the update are corrupt.

    What is the full error message that you receive?

    I suggest you follow the steps mentioned below to check if the problem is with the update components:

    Method 1: Reset the update components

    See the site:

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Warning: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    http://Windows.Microsoft.com/en-us/Windows-Vista/back-up-the-registry

    Method 2: Run the system update readiness tool

     

    See the site:

    System update scan tool corrects errors of Windows Update in Windows 8, Windows 7, Windows Vista, Windows Server 2008 R2 and Windows Server 2008

    http://support.Microsoft.com/kb/947821

    Method 3: Turn off the antivirus software

     

    See the site:

    Disable the anti-virus software

    http://Windows.Microsoft.com/en-in/Windows-Vista/disable-antivirus-software

    Important note: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you need to disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network, while your antivirus software is disabled, your computer is vulnerable to attacks.

    I hope this helps. If the problem persists, let know us and we would be happy to help you.

  • Is there a problem with ValueChangeListener and af: table?

    Hello...

    I use JDeveloper 11.1.2.0.0

    Is there a problem with ValueChangeListener and af: table.

    Here my problem...

    I have two inputtext in af:table and I want to change the value of inputtext2 when I change the value of inputtext1
    so I put the autosubmit = "true" to inputtext1 and set the valuechangelistener method that is in the page bean
    and I put the partial inputtext2 trigger = "inputtext1 id".

    but when I run the page and change the value of inputtext1 that nothing happens.

    But if I have the previous scenario in af:panelFormLayout instead of af: table its work and the value of inputtext2 is changed to the user.

    any ideas...

    Thans.

    Sorry for the delay... :(

    And why if I use page JSF is the binding property disappears
    in the tab advanced in the property inspector.

    If you cannot power discovered the binding property in the palette of the means, your jsff page is automatically linked.
    If only the problem.

    try to create the new page jsff, while creating jsff, finally there is radio box something like
    do not expose the UI components automatically. check and create.

    and create a java file. Then you can bind components with the java file as you wish.

    to check your jsff page is autobinded are no means?
    Open your jsff page.

    Menu's that are on it - in this section. You can see the design menu that struck. If you hit it means you see Wizard property page go to the tab component binding
    There is a check box available

    If the box is ticked means that you page are automatically linked. If this isn't the case, you must link.

    -edited lately.

  • Flash builder 4 check load useful integerity: failed with code 1

    where to install flash builder 4 on windows 2003 32 x servers

    had this error

    ------------------------------------------------------------------------------------------

    Exit code: 7


    -------------------------------------- Summary --------------------------------------


    -0 fatal Error (s), 2 error (s), 2 warning (s)


    ATTENTION: Payload {7E5AA19B-0B85-4f44-BA26-728851489200} Adobe Flash Player 10 ActiveX is already installed and the payload of the session {5EE868D6-7B6B-49ee-AF60-09B1358AFFD7} Adobe Flash Player 10 ActiveX has no relationship between/conflict with it.


    ATTENTION: Payload {40F95A03-885A-45fb-9A14-486BEFEDDF34} Adobe Flash Player 10 Plugin is already installed and load the session useful {FB7F30B6-BFBF-4d2c-9F61-B5533659ACBE} Adobe Flash Player 10 Plugin has no relationship between/conflict with it.


    ERROR: Check the payload integerity: failed with code 1


    ERROR: Could not get the root of inChildPath
    ------------------------------------------------------------------------------------------ ------------

    who can help me, I will thank you very much

    Hello

    Please, deselect the option of Flash Player in Setup before you begin the installation and see if the installation is successful. (Please uninstall Flash Builder and restart the computer before trying to reinstall)

    If this does not help, please run the cleaning of CS5 with option to uninstall Flash player and FB, restart after having cleaned and now reinstall FB (selection also the Flash Player)

    CS5 tool can be downloaded from http://www.adobe.com/support/contact/cs5clean.html

    Please let us know if this helps you.

    Thank you

    Deeptika

  • Is there a problem with my credit card for apts

    Is there something wrong with my credit card for the purchase of the apartments?

    I'm unable to make purchases on my Apple, I touch mini

  • Unfortunately I can't move my watch to watch OS 2.2! Why! Is there a problem with IOS 9.3.1 really no advice did not work

    Unfortunately I can't move my watch to watch OS 2.2! Why! Is there a problem with IOS 9.3.1 really no advice did not work

    Hello

    If you have already installed a beta seed or a developer, first remove all beta profiles.

    Instructions are available here:

    Update the software on your Apple Watch - Apple Support

  • Is there a problem with the site?  I'm unable to purchase/download anything.

    Is there a problem with the site?  I'm unable to purchase/download anything.

    For accuracy, I'm not on the Web site, but my windows desktop program.

Maybe you are looking for