value of the level in hieararchical queries

I'm trying to accomplish a well-known problem turn the channel with column separators.

This is the query that I found when studying the field:

   SELECT level, regexp_substr(value, '[^;]+', 1, level) col
            FROM (SELECT 'val1;val2;val3' value FROM dual  ) 
            CONNECT BY regexp_substr(value, ';', 1,level-1) is not null

Surprisingly, it works!

LEVEL COL
1val1
2val2
3val3


The question is how we can use 'level 1' as a fourth parameter of regexp_substr in connect by if clause level value starts with 1?

It seems to level 1 is equal to zero then, and the query is to break. In addition the following query

 select regexp_substr('val1;val2;val3', ';', 1,0) from dual

Indeed falls with the error message

ORA-01428: argument '0' is out of range

Finally if I change the level setting, it works as expected assuming that level value starts with 1

   SELECT level, regexp_substr(value, '[^;]+', 1, level) col
            FROM (SELECT 'val1;val2;val3' value FROM dual  ) 
            CONNECT BY regexp_substr(value, ';', 1,level) is not null

LEVEL COL
1val1
2val2

Hope someone can explain to me how it works or share a link to the description of this query processing.

You need to look at the complete picture. Hierarchical queries have 2 START WITH and CONNECT BY clauses. START WITH may be explicit or implicit. Implicit START WITH means build the hierarchy from each line. In any case LEVEL = 1 is to START WITH the line. LEVEL 1 > are generated by CONNECT BY. So LEVEL = 1 is produced independently CONNECT BY conditions. Hope it answers your question.

SY.

Tags: Database

Similar Questions

  • Profile of values at the level of responsibility or Site Multi Org

    Hello

    If a profile as set of books option is defined at the level Site and liability and is different will this cause a problem? Why? I'm on a shared instance and simply check the profile values are correct for our ORG.

    Thank you

    Profile options may be different at the level of responsibility and the level of the site. That will not cause any problems.
    When you go to responsible, value of this level will be effective.

    Sandeep Gandhi

  • How to use the value of the select in SQL queries list

    I have a list with the list of states (P1_STATE) in Page 1. When I send the page, I get the VALUE of P1_STATE in Page 2 to the format: DC:AS:AK. I use the application to display the form in the Page 2 below.

    Select *.
    of STATE_REF
    where IN location_id (: P1_STATE)

    Now the format of P1_STATE will not work in the query. So it's not fetch all results. Is there a way in which the values of the selection list can be used in SQL queries. Thanks for the help.

    Hello

    Try something like:

    select *
    from STATE_REF
    where ':' || :P1_STATE || ':' LIKE '%:' || LOCATION_ID || ':%'
    

    Andy

  • How to get the value of the level attribute of memory in the adf bean

    Hello

    I put the value of an attribute Memory_scoped using a propertylistner set. I now get this value attribute to reach memory in my bean (requestscope) adf.

    So how do you get these. I put the listner as in the screenshots below.

    prop.png

    Please help on this case.

    User

    You are not get value at all or get an incorrect value?

    Why don't you get fair value of link, why do you use the earpiece of the property?

    Ashish

  • Allowing entry of the value of a property at the level of the hierarchy and restricting to whole new level.

    Hi all

    I have two property definition Custom.Levelnumber and Custom.Allowattribute which are the goods as well as Local property node level.

    I want validation to restrict the user to allow any value for the Custom.Allowattribute property for any level of hierarchy other than level 6 i, e Custom.Levelnumber with the value 6.

    all other classes in the hierarchy must have an empty value for the Custom.Allowattribute property.

    Hi Madhu,

    Try this-

    If)

    Not (Equals (Integer, PropValue (Custom.LevelNumber), 6));

    Not (IsDefinedPropVal (Custom.Allowattribute, ABBREV (())).

    True)

  • How to assign the value to the application-level element

    Hello

    I'm learning to APEX.  I use version 4.2.6.

    My question is, I set a text field called 'FINANCIAL_YEAR' in the login page.  I wanted to know how to assign this value to a text element of Application level (on page sent), so that I can get this value through at my request.

    Thank you

    -Anand

    anand_gp wrote:

    Yes, I created a 'text area' under 'HTML' in the 'Home' page  Who accepts the exercise of a table through LOV.  I intend to assign this value to a global variable so that this variable can be read in any of the application to filter the result set from different tables (not yet built the rest of the application).  To do this, I was intending to use "Shared components"-> "Elements of Application".  I'm still not quite sure how it works.

    Start by reading the documentation on elements of application.

    Go to the shared components > Application parts and create your G_FINANCIAL_YEAR item. Value Session State Protection Restricted - can not be set the browser so that the value is not editable by the user, falsification of URLS or scripts.

    On the home page, if there is not already a button to submit the value of the fiscal year, add one in the HTML area, with the Action as a submit Pageclick. Otherwise, you can do without the button and using submit Page in Page Action when the changed value select the parameter in the list so he can undergo.

    Then, in the section of the Page processing, create a calculation:

    Point Type: Application-level element

    Calculate Item: Application: G_FINANCIAL_YEAR

    Point calculation: After submit

    Type of calculation: Value of the element

    Calculation:

    Run the application, select a value in the list of the fiscal year and submit the page. Review of current session state in the viewer of session state by clicking on the link of Session in the toolbar developer. Select the Elements of Application in the view list, and then click set. The element of your application and its current value must be visible. You can now reference value throughout your application by using the appropriate syntax.

    You should also consider if a default value (for example the current year) using a calculation Application from the point of calculation on the new Instance and coordinate the application point and part of the homepage using point application as the Source of value or an expression with Source page element, the value always, replacement of value that exists in the session state.

  • LIMIT to THE dimension values to certain level of hierarchy in OLAP_CONDITION

    Hello

    I use OLAP 10 g. I try to limit the dimension values to certain level of hierarchy (not only a certain value).

    I have only one dimension: CHANNEL and two levels for the dimension: CHANNEL_TOTAL and CHANNEL_NAME.

    In order to limit to a certain value, it is an example of code:

    OLAP_CONDITION (R2C, ' channel LIMIT to "all channels"', 1).

    But what about limiting to set values to the CHANNEL_NAME level?

    something like

    OLAP_CONDITION (R2C, 'Channel LIMIT to CHANNEL_NAME', 1) does not

    Thanks in advance
    Peter

    channel_levelrel is the purpose of relationship metadata containing the relationship of level for each Member.

    You can try:
    OLAP_CONDITION (R2C 'LIMITED channel TO channel_levelrel eq "CHANNEL_NAME" ', 1).

  • How to reference the value of a < af:inputText > to the level of the view in a java class

    How to reference the value of a < af:inputText > to the level of the view in a java class to level model? Thank you!

    Hello!
    1: you must close this topic and open another... :))) and game question calls for a response (if my answer is correct: set my answer - correct answer)...

    2nd: for example in your java class in view level:

    links BindingContainer private;

    public BindingContainer {} getBindings()
    If (this.bindings == null) {}
    FacesContext fc = FacesContext.getCurrentInstance ();
    This.Bindings =
    (BindingContainer) fc.getApplication () .evaluateExpressionGet (CF,
    "#{bindings}."
    BindingContainer.class);
    }
    Return this.bindings;
    }

    Public Sub UseSetMyParam()
    {
    Fcab FacesCtrlActionBinding = (FacesCtrlActionBinding) getBindings () .getControlBinding ("setMyParam");
    fcab.doIt ();
    }

  • Need to use values from the first query in other queris to the data model

    Hello
    Here is my requirement-

    I use the data model to run multiple queries. The first query, I get 10 records. Now, I want to use these 10 records in the second query to get my final result. I am not able to use the sub query as the two motions are quite long and complex.

    Select distinct Bishop of emp

    Select empno, emp where Bishop in (: Bishop)

    I can't use: Bishop because it will give only the last value stored at Archbishop. Is it possible to be able to use all the values from the first query in the second query using the data model?

    Hello

    Are you sure that you have your "dataStructure" configured correctly? Try this simple example:

                                                                          
    

    Hope this helps

    Andy

  • SdRS get - VM level and the value of the SDR for VM

    Hi there at - it a function to set the type for multiple virtual machines

    Take a look at 1. Re: change the level of automation of the drs, vm storage  

  • How to disable Lov when the value of the attribute is NULL at the level line

    Hi all

    JDev 11.1.1.5.0

    I have a view as a table ADF jsff page object. Value of the attribute in a row may have null values.
    And I want that Lov must be disabled when the value of the attribute in the row is null or not.
    So please suggest me how can I implement this.

    Kind regards
    Marie-Claude

    Set to the disabled for LOV attribute property

    disabled="#{bindings.YourAttribute.inputValue eq null}
    {code}                                                                                                                                                                                                                                        
    
  • Passing multiple values at the request of the State (no status page)

    Hello

    [APEX 4.2.4.00.08 on the 11.2.0.3 database]

    I didn't know how to explain briefly what I need in the title of the discussion, that's why I added the song "(non page rapport)". "  I met a lot of threads associated with passing of selections multiple values from one page to another, or via a URL from one page to another.  I know how to do this.  The problem I have right now is trying to pass the commas of the values contained in an application to a report query element.  Here's where the "(rapport non page) ' comes into play."  I refer to the report query at the level of the application (i.e. shared components-> report queries).  I wish really it had another name for it.  "Report on the application of queries", perhaps?

    In any case, my report query has a bind variable, AI_ID_NUMBERS, that is defined correctly in the shared-> components report queries. However, when this item application has multiple values such that AI_ID_NUMBERS = 4, 5, 6, 7 etc., my URL looks like this:

    myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7

    So, this returns only one record for the report where the identification number is 4, one.  I tried a string parameter of Substitution of Application (URL_REPORT_1) with the two following variants (for which both return only a single record):

    Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS: & AI_ID_NUMBERS.

    Substitution string = URL_REPORT_1 and Substitution value = f? p = & APP_ID.:0 : & SESSION. : PRINT_REPORT = report_1:AI_ID_NUMBERS:-& AI_ID_NUMBERS. \

    returns...

    myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1:AI_ID_NUMBERS:4, 5, 6, 7

    myapexsite.com/f?p=456:2:1234567890:PRINT_REPORT=report_1:::AI_ID_NUMBERS:\4,5,6,7\

    .. .respectively

    I really thought that the backslashes would have solved the problem.  Any ideas why my report request (PDF) returns only one line?

    Thank you

    -Seth.

    Well, too bad. I realized the mistake I did.

    When you work with 'request report queries', there is an option to include variable bind, for example the application or page elements.  I had already done that, but for some reason, thought that I also had to pass the parameter and its values in the URL.  This is not necessary since the report query query already has the issue of the application/page related to it.  The following URL works fine:

    myapexsite.com/f? p = 456:2:1234567890:PRINT_REPORT = report_1

    And, Yes, it's the URL that is provided when you set up a "application report query.  I was thinking too hard.

    -Seth.

  • Reset the value of the selection list

    APEX version: 4.2.2

    I'm fighting to implement a solution to reset the value of an element from the list of selection on a page in my application.

    I currently have about 4 pages in my application with a level of tabs with every page on its own tab.

    I have a report of Emp page that lists employees. The page contains an element of selection list for emp_no who submits the page when the value changes. The query for the list of selection queries the emp for name and emp_no table. It has:
    Display additional values: Yes
    Display Null values: Yes
    Display NULL value: all THE
    Return NULL value:
    (no value for the return NULL value)
    Page, in itself, works the way you want. During the first visit to the page, EVERYTHING is selected and the report shows all the EMOS. If I select a specific employee, the page refreshes with just this employee.

    On the Main page is another employee list report. The report has a link between the employee id column and the Emp report page. The link sets the value of Emp.emp_no to the value of Main.emp_no. It works very well so if I take emp hand 123, 123 shows Emp.emp_no and the report shows that retail for emp 123.

    The problem is when a specific employee has been selected previously from the homepage or the Emp page and I click on a tab to another page, say the status tab / page and then click on the tab of the page of the Emp. The current behavior of the page, is that it continues to show some used was previously selected regardless of how it has been set, either Emp or to the homepage page. I want to reset select Emp.emp_no ALL (or null) if I navigate to the page of the Emp to any other page except hand or Emp itself.

    I searched through the forums and tried to use processes at the level of the page and after region to reset the value of Emp.emp_no, but nothing has worked. I believe there is a 'simple' way to do it that doesn't require coding on each page to set Emp.emp_no on a null value before calling it.

    I would like ideas on solving this seemingly simple task that has managed to escape.

    Thanks in advance.

    cagora

    Use a query in your link for filtering the selection list. Create a compuation on the definition page of the selection to NULL list if the request is NULL > PL/SQL Expression >: APPLICATION IS NULL. In this way, you can check the list of selection gets nulled while accessing the page normally.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Apress.com/9781430235125
    https://Apex.Oracle.com/pls/Apex/f?p=31517:1
    http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
    -------------------------------------------------------------------

  • How to increase the level of Effort BY?

    Hello

    I am trying to restore a primary application of a number of separate projects of component LVFPGA LVFPGA.  Each of these smaller basic functions is running in their own SCTL in new the LVFPGA master file.  Small functions all meet them timing, but not the master app.

    I use about half of the chip so it seems to me that it should not be difficult to place and route.

    When my compilation fails because of time constraints, he says the following:

    WARNING: By: 62 - your design did not meet calendar.  Here are some suggestions to help you to keep to the timetable in your design.

    ...

    Increase the setting of the level of Effort BY to 'high '.

    Use the 'xplorer' Xilinx script to try special combinations of options known to produce very good results.

    See http://www.xilinx.com/ise/implementation/Xplorer.htm for more details.

    So my questions are:

    (1) how can I increase the level of Effort BY?  Has NEITHER provided a hook for setting this value and if so what is its current level / by default?

    (2) we access level user to the script 'xplorer '?  If so, where is this located and can OR recommend some parameters that are compatible with the SMU-5641R.

    Thank you

    The files in the folder of Xilinx are never overwritten or replaced, these default values are simply not used if you provide your own .opt files to the compilation sequence. For these two products, we provide custom files, I've already mentioned. These custom options are communicated to the server during each request compilation as it must have everything necessary to provide correct results regardless of compilation locally or remotely (or even on a remote compiling the server who has not installed the drivers from target).

    Insofar as you need exactly what settings level effort, which will be dependent on the design. I suggest you look at Xilinx documentation on their suggestions on how to set these options based on what kind of compile questions that you hit. In general, I would try them likely increases in the following (probably with compilation time) order:

    "" plan of access-Calendar - ol std' and ' normal - ol std ".

    'map - calendar - ol high' and ' "normal - ol std".

    "map - calendar - ol high' and ' by - ol high."

    [Or if you will just operate all night and don't care about compile time, you could jump to top/high... and work backwards if you want to use the minimum effort it takes actually.]

    If these don't work for you (or if you want an alternative solution), then you need to review your design and your code to see if you can improve the synchronization in the areas which are at the origin of chess.

    Side-note:

    Modifying the files in the directory of Xilinx does not apply to this situation. I do not know the behavior to change these files, but it would be easy to deduce by experimentation (i.e. edit the file locally, perform a remote generation, see if the changed options were used... If not, then restore the local file, the remote file instead, rebuild, etc.). But even once, it does not apply to these objectives and behavior will be verified based on file by a specific version of LabVIEW file, since it is an implementation detail that may change.

  • "Control terminals on component connector not on the level superior. block diagram" to comment on the report of the ADC

    Hi all

    Could someone enlighten me please, what does this comment on the value of the ADC

    "Terminals on component connector not on the block diagram of higher level of control.

    This means that some terminals is hidden within certain structures of the case and does not show not not the diagram without going into the structures of the case or by 'higher level block diagram', it means

    main.VI and main.vi controls must also be connected to the connector pane?

    Thank you

    K.Waris

    On the one hand, this means that they run on your screws VI Analyzer, since it is a warning in extenso you receive.  This means simply a terminal which is connected to the ConPane is not on the top level diagram, IE. within a structure of housing.

    As to why he is often not a good idea to do that read this classic thread:

    http://forums.NI.com/T5/LabVIEW/case-structure-parameter-efficiency/m-p/382516#M191622

Maybe you are looking for

  • How to stop or to silence all sounds embedded on Web sites by default?

    Firefox 20.0.1 in a work environment. All sounds are distracting, if videos of Yahoo! with the unwanted audio for example, or any other audio auto-lecture or background sound.

  • each other envelope prints upside down

    I have a new officejet Pro 8625 connected to my mac has been upgraded to yosemite (10.10).  I downloaded the printer driver (v. 10.0) that corresponds to this OS.  When I print merged envelopes #10 mail in MS word (v14.4.5) another each envelope prin

  • How can I set up LPR printing?

    I have a HP LJ 4050 and use a back Hawking print server in windows 98 days. I continued to be able to use it by setting my IP address that is stored in the device of Hawkings and then go to the Ports tab and then configure the ports tab and select LP

  • Need driver XP for Nvidia Go7300 series Satellite has

    Hello. I am looking for a driver for Nvidia 7300 Go.My operating system is Windows XP and the problem is that the driver I have doesn't have resolution 1280 x 1050

  • Realtek RTL8151GH-CG bluetooth?

    I recently bought a HP Pavilion 500-319na and the wireless card is a Realtek RTL8151GH-CG, im wondering does this support bluetooth and I need extra parts to make it work? Thanks for any advice in advance.