restrict the application of hierarchy based on a given value at the leaf node level

Is it possible to restrict a query of the hierarchy based on a test given at the leaf node level?

For example, in the data presented below, I like to shoot the entire hierarchy for terminal nodes that have 'John' in the criteria:

Parent value criteria
Z
A Z
B HAS
C B John
D B Smith
E Z
F E
John F G
H F Neal
I have F John

Filertering on John I want to return together to resemble the following prints:
A
B
C
F
G
I have

I tried the following, but it only gives me the nodes:
SELECT
LPAD (' ', (LEVEL) * 3,'.) ') || t.Valeur
OF tbl_test t
WHERE t.criteria = "John".
START WITH t.valeur = "Z".
CONNECT BY PRIOR t.valeur = t.parent;

Rule return form the above query:
C
G
I have

Any help is greatly appreciated.

It is possible, but not conventional =)

Sys_connect_by_path allows you to concatenate the path and another request of the hierarchy of dividing a value generated in the rows.

with t as (
select 'Z' as  Val , null as  Par, null as  Criteria from dual union all
select 'A' as  Val , 'Z' as  Par, null as  Criteria from dual union all
select 'B' as  Val , 'A' as  Par, null as  Criteria from dual union all
select 'C' as  Val , 'B' as  Par, 'John' as  Criteria from dual union all
select 'D' as  Val , 'B' as  Par, 'Smith' as  Criteria from dual union all
select 'E' as  Val , 'Z' as  Par, null as  Criteria from dual union all
select 'F' as  Val , 'E' as  Par, null as  Criteria from dual union all
select 'G' as  Val , 'F' as  Par, 'John' as  Criteria from dual union all
select 'H' as  Val , 'F' as  Par, 'Neal' as  Criteria from dual union all
select 'I' as  Val , 'F' as  Par, 'John' as  Criteria from dual
)
select distinct regexp_substr(path, '[^,]+', 1, level) as val
from (  SELECT  sys_connect_by_path(val,',') as path , rownum as row_id
          FROM   t
        WHERE t.criteria = 'John'
        START WITH t.val = 'Z'
        CONNECT BY t.par = PRIOR t.val
     )
connect by nocycle regexp_substr(path, '[^,]+', 1, level) is not null
and prior row_id= row_id
and prior dbms_random.value is not null

Tags: Database

Similar Questions

  • Run specific applications or program in W7 Pro restrict the normal user

    Hi, fields,

    Thouhg I can see Win7 allows the user to restrict certain applications or programs (chosen by admin) to run, this feature is ONLY available in only versions of Win7 ULT/ENT.

    What is the equivalent (near equivalent mechanism) to do in professional Win7. XP Prof (legacy) used to have the same functionality in the form of RSP (restrict software strategies) and I'm sure that Microsoft should have caught something in Win7 prof too (despite the Applocker moving to UTL/ETN editions), such a feature of resitct users of the app/programs managed

    Enjoy other pointers to achieve the same thing in my Win7 Prof environment?

    Thank you
    Vermorel

    Vermorel

    Hi Vasforu,

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. You can continue to work with ITKnowledge by all means, but also to know that you can get support information TECHNOLOGY-oriented public Pro on TechNet here:Technet Windows 7 Security Forum. Thank you!

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

  • Restrict the application of Digital Signatures

    Hello

    I am trying to determine what options are available natively in Acrobat to restrict the type of certificate that is used to apply a digital signature.  AFAIK, Acrobat, default, seems to allow the use of a certificate that has the extension 'Digital Signature'  This has the potential to create big problems in a regulated environment.

    In my organization, our users receive multiple certificates for different applications.  For example, a user can have a certificate for VPN, one for SMIME email access and, finally, one that is specifically for the application of electronic signatures.  There is a more rigorous selection process for obtaining a certificate of electronic signature, and it also invites for a password every time that the private key is available.  Each type of certificate has a separate certification authority.

    We have configured the identities approved each user in Acrobat by deploying a file of address book for them.  We have only our CA electronic signature as a CA approved in Acrobat (with some other universally approved authorities).  The result is that, when a signature that has been applied by using any other AC, Acrobat does not check the signature.  It's good, but it isn't enough since the dynamic images that come with Acrobat digital signatures do not appear on the documents printed or flattened.

    Basically, I am trying to determine if there is a way to configure Acrobat (in native, out-of-the-box mode) such that it will only request digital signatures using certificates that are issued by an authority that is defined as a trusted identity.

    If anyone has encountered this before?

    Hi Mike,.

    You should apply the starting value for each signature field that you want to restrict. The starting value becomes part of the properties of the signature field.

    You can use the JavaScript debugger included in Acrobat. To select bring him the Advanced > Document Processing > JavaScript debugger menu item (providing you use Acrobat Pro v9).

    Here is an example of code that you can apply where you need a specific issuer and the use of the key:

    var f = this.getField ("Signature1");
    caCert var = security.importFromFile ("Certificate", "/ C/Documents and Settings / / My Documents/myCA.cer");

    f.signatureSetSeedValue({)
    certspec: {}
    Issuer: [caCert],
    keyUsage: [0x7FFFFFF7], //Insure the certificate has value KeyUsage nonrepudiation
    flags: 0 x 34 / / 2 requires transmitter + 32 requires the use of keys
    },
    });

    Let me know if you are looking to apply a different condition.

    Steve

  • How to restrict the use of the connection profile Anyconnect to traffic from an interface?

    Hello

    A few questions about the profiles connection Anyconnect and dynamic access policies:

    • I set up multiple profiles connecting Anyconnect with different characteristics. I want one of the profiles to be visible and usable only when the Anyconnect client connect through a specific interface (and not the outside interface). How can this be configured? As it is now all profiles are visible via all interfaces compatible VPN.
    • DAP: When dynamic access policies are configured, these will be global or is it possible to link a policy to a specific connection profile? I would like to configure the DAP Protocol to be effective only when you use a specific connection profile. What is a good way of thinking? What I want is: when a user Anyconnect choose a specific connection profile, it needs to connect using a DAP which requires membership in an ad group and existence of a local file.

    Best regards

    Thor-Egil

    • Unfortunately, you cannot restrict the interfaces of the AnyConnect fitting profile is assigned to AnyConnect connection profiles are global settings, no interface specific setttings, therefore, it will be available no matter what interface the AnyConnect is connected to.
    • DAP political work as an access list. It in the lowest priority to highest priority and he stops at the first match. For example, you can create a number of policies on what you want to match on. You cannot however force the user to authenticate to AD when they choose a specific group of tunnel. DAP is used to apply that only users that meets policy is allowed access. For example: If the user belongs to a specific ad group and also have a file exist, the user will be allowed access to use the AnyConnect. So it's the application that the user connects from a company laptop where you specified the policy, that is to say: exist in AD and have a specific file in his laptop. This is to ensure that those who try to connect to the site of the company non-portable, or internet kiosk have accessed to the VPN, because they may not be protected and can infect your corporate network, if they are allowed to access.

    Hope that makes sense.

  • Security hierarchy based in OBIEE

    Hello

    I have a simple request, but will have a hard time trying to figure it out.

    I have a dimension store with the following levels: store - city - country

    I have a single measure in the fact table: sale

    I want to be able to allow users a specific group access sales grouped by country, but not being able to go into the details by city or store.

    Other users would be able to see the sales by country and city and no stores.

    A third group of users would be abe to see sales of all three surveys.

    How can I achieve this in the security model for RPD?

    Thank you

    Joao Moreira

    Hi João,.

    It is possible. check these items. Looks like useful for this.

    Security at the level of the handful of hierarchy OBIEE - function IndexCol | GerardNico.com (BI, OBIEE, data warehouse and OWB)

    A different look at the hierarchy based security in OBIEE | Carpediemconsulting blog

    Thank you
    AJ

  • restrict the entry of text in the textfield size no characters.

    I don't usually have to tinker too much with dynamic/input text, so im really hoping that this is not a matter of me finding the right or adjustment setting in the properties panel.

    I have a series of multi-line text entry fields.

    For each text field, I just need to limit the number of characters to the size of the text box. so, essentially when the field is filled in, it does not accept any new entry.

    Restrict the character field is not a viable solution based on the police approved for this project. (18 s W can fill the field, but s 18A fill in only a single line of text.)

    Any suggestion to solve this problem would be appreicated.

    M.

    Yes, you should be able to Bassontautorises similar solution using height instead of width.

  • The Application of the filter node of event using the mouse down?

    Hello

    I have a question regarding the application of the filter nodes of the Mods and PlatMods event.

    With respect to the event "Button" filter node, I can change the response when I click on the botton, either for a right click or left click.

    The filter node throwing event is more common to use, it can provide the opportunity to reject the action of the set button.

    But now I can't realize how to use the node of the Mods and PlatMods event filter.

    I change the value of the double click event filter node, then what?

    Could someone give an idea or a suggestion? Example or scenario is preferred, thank you very much.

    There are several reasons why you want to change the action with the filter node. For example if you also have a key value changed event, you could turn a right-click (that normally would be open the contextual menu) with a left click then immediately triggered the value change event.

    Similarly, you might have a change of value and double click even for a listbox control. Then, you could add a fiterling event mouse that would make a single click (normally not trigering a change in value) in a double-tap for some values, but leave in one click for other values.

  • restrict the scaling axis in the xy graph

    Hi all

    After you apply due diligence in analyzing the context-sensitive help, labviewwiki and these fine forums, I couldn't find a hint on how to do this:

    I like tor would restrict the scale of only the value of a XY Chart axis. Or, to put it in other words, I want the user to be able to zoom and navigate a signal in the time domain, the realm of values must remain fixed to a pair of mini/maxi - assume that the 0-100% for simplicity. Ideally, I would like to use the graphic palette for this.

    Here's what I tried, with the result

    -disable the range => Y scale: no such property

    -catch the "Change of scale of measurement" event and game of scaling to a fixed value => glitter, the property cannot be changed AFTER that the GUI has already redesigned it

    -change the graphic palette of customization of the control is => not possible

    -set the Disabled State-online graphic palette no longer works

    Thanks for any input. I hope I'm missing something really basic here.

    I don't see an easy way to lock the pan function. You can set the minimum and maximum, but - as you said earlier - you get a jumpy (flashing) chart. Even if the update rate is very high.

    If I (or someone else) comes up with something, we'll let you know.

    Apart from the use of an ActiveX (ActiveX 2D chart) or .net component - they have their own unique problems. Perhaps that is a possibility.

    Rob

  • Restrict the automatic download at specific times of the day

    Is it possible in Windows 7 Home Premium for restrict the update of Windows automatic download at certain times of the day? I know I can set the time it INSTALLS updates, but I want the time it DOWNLOADS the updates...  Even with PIECES try to intelligently determine when is the right time to download updates, I would like to restrict them to download only during the first hours of the AM.

    N °

    That being said, you can change you updates automatic setting Automatic to download updates but let me choose whether to install them. After this, no updates will be installed without your approval. See http://windows.microsoft.com/en-us/windows7/Change-how-Windows-installs-or-notifies-you-about-updates

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • How to restrict the running command prompt?

    How to restrict the running command prompt?

    I already know the method: HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System DisableCMD: 2

    but, but, it is possible to change reactivate cmd used much the system tool software

    So I want to deny the change of registry value by the software used, I changed all permissions to the registry [System] refusal keys with my account.

    but after a modified registry key permissions denied, disableCmd was inactivated more.

    It is impossible that the two parameter [disablecmd: dword = 2] and [{System} lock keys: administrator of the deny all permissions in my account]?

    This issue is beyond the scope of this site which is for the consumer to related issues.
    To ensure that you get a proper answer, ask either on the Technet site, if it is a type of Pro problem, or MSDN if it's related to the developer
  • Restrict the possibility to send to the public mailing list

    What is the best way to limit subscribers of voice mail to send a voice message broadcast message? My first impressions are to use MS Exchange to restrict the ability to send to a Distribution list and restrict to the list of users specifice. Example: 600 + site user with a public Distribution list. Only human resources should have the possibility to send a voice message broadcast... you wouldn't want a disgruntled employee to send a broad system voicemessage.

    You can restrict users to a Service class to send messages to the list of distribution _any_ - what causes the conversation addressing do not offer DLs when users are searching by name or ID. There is no way 'cherry pick' DLs and decide that a user can leave messages for certain distribution lists, but not others.

    Yes, you can also do it in the Exchange and sending fails (the user will receive a nondelivery report, however, which is perhaps not ideal).

  • restrict the vlan address mac

    Hello gentlemen, I bought a 48 sf300 and 4 VLANS.

    How can I restrict the mac address of the device can be connect each vlan? I just want to let macs for vlan, should join the pc to a vlan.

    Thank you very much!

    Pedro here is a document for port security.

    https://supportforums.Cisco.com/docs/doc-27720

    https://supportforums.Cisco.com/docs/doc-27753

    -Tom
    Please mark replied messages useful

  • Restrict the Wireless Transmission range

    It is possible to restrict the scope of wireless transmission? If Yes, how granular can be defined? For example, if I want to allow reception only within a radius of 50 to 100 feet from the base station (assuming the middle of terrain). Lowering the output power will affect the bandwidth speed?

    Cisco Aironet BSE340 and BSM340 base stations have been set at 30 mW. Unfortunately, as they are out of use, there is little documentation available for them, the best being http://www.cisco.com/en/US/products/hw/wireless/ps441/products_tech_note09186a00800944a7.shtml

    Aironet products of Cisco Access Point are adjusted through software controls and are most often in increments fixed throughout their operable range of 30 mW - 1mW for the 340 series and 1mW-100mW for the 350 series 1100 and 1200. You will find more detailed information on wireless power settings in the configuration of each of the products of http://www.cisco.com/en/US/products/hw/wireless/index.html guide

  • Can we restrict the number of table rows to display on a page that is only 2 or 3 rows appear? How to do this?

    Mr President.

    Can we restrict the number of table rows to display on a page that is only 2 or 3 rows appear? How to do this?

    Concerning

    Tender,

    Set the RangeSize property on the table.

    See you soon

    AJ

  • How to select a pixel, or the value of the pixels based on a RGB value, or a range of values?

    Can Photoshop select a pixel, or a set of pixels based on a RGB value? For example, select all the pixels that are 5,6,5 or all pixels that are 238-248, 238-248, 238-248

    Yes.

    Select the ranges of colors in Photoshop

Maybe you are looking for

  • Firefox Add - ons in any way interfere with a VPN?

    I recently ordered a VPN. Itgood, but has its ups and downs. I asked the same question people VPN Firefox Add-ons. They said that he "may" impede the VPN. Laughing out loud. Nothing says confidence like the word 'power '! It doesn't seem to work perf

  • VPP error 5002

    Hello I just signed up for the VPP Business and can't seem to get my install ID correctly to make a purchase. After signing in, I get the message, "this identifier Apple has not yet been used with the purchase Volume for business program.»  Please cl

  • Scorecard 4 does not accept entries from 2010.

    I am also using the 4 card and having the same problem as textoby.  Boy are my foires handicaps.  I have try several ways to enter data, but all I get is 1910 ir 2000.  My disabilities are terribly messedup.  Someone please help!

  • Songs are missing after the firmware update

    Hello I've updated my Sansa Clip 8 GB mothers today via Autoupdater. Everything works fine, except that the root folder is different now and music disappeared somehow. Well, the music is still there (it's GiB 4.2 of 8 complete), you can even hear it.

  • I dropped my computer and now when I turn it on it just say err2err3

    I dropped my computer. I tried to do a system restore and had an error on an integer. so I turned it off and now I have an error what who says err2err3 immedaitely. Help, please