If you select a value inside the brackets

IM using oracle 10g.
Does anyone know to select a value in a parentheses?

For example, my data looks like

Column1
----
test (name1)
Test2 (name2)
test3 (Name3)

I only take values outside parentheses. the only thing I've found is select substr, but im do not know how to use it

Published by: Jay on July 26, 2012 07:17

Maybe this:

SQL> with my_tab (column1) as (
  2  select 'test (name1)' from dual union all
  3  select 'test2 (name2)' from dual union all
  4  select 'test3 (name3)' from dual
  5  ) -- end of sample data
  6  select column1, substr(regexp_substr(column1, '[(][^)]*'), 2) str
  7    from my_tab;

COLUMN1       STR
------------- ------------
test (name1)  name1
test2 (name2) name2
test3 (name3) name3

Tags: Database

Similar Questions

  • Migration to Jdev12c: Null pointer when you select 'no value' in the drop-down list

    Hello world

    We will migrate an ADF 11.1.2.3.0 to 12.1.2 JDeveloper app so we have a page jspx with a chart based on a VO and a drop-down list selectOneChoice to optionally filter the data of the VO, which makes the graph to change automatically.

    In version 11, it works perfectly, but in 12, when the user does not select no matter what filter you get this exception:

    < 26 November 2013 20 H 32' THIS > < WARNING > < org.apache.myfaces.trinidad.util.MessageFactory > < BEA-000000 > <

    java.lang.NullPointerException

    at com.sun.el.parser.AstValue.setValue(AstValue.java:214)

    at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:291)

    at org.apache.myfaces.trinidad.component.UIXEditableValue.updateModel(UIXEditableValue.java:361)

    at org.apache.myfaces.trinidad.component.UIXEditableValue.processUpdates(UIXEditableValue.java:311)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.updateChildrenImpl(UIXComponentBase.java:1430)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.updateChildren(UIXComponentBase.java:1420)

    at org.apache.myfaces.trinidad.component.UIXComponentBase.processUpdates(UIXComponentBase.java:1174)

    ....

    Any idea?

    Thank you very much in advance,
    Jose.

    Hi Jose

    In your links, select your list. Then in the Inspector properties at the end, you will see something like optionList (don't remember the name), but you'll know when you see it. Select the index instead of the object.

    Concerning

  • Extraction of values within the brackets():


    Hello

    Please, help me to overcome this problem.

    I want to extract the value inside the caliper.

    example:

    place (Chennai.Mumbai, Delhi)

    I want inside the support value which is chennai.mumbai, delhi.

    I used replace Regualr expression but I can't.

    Thank you

    Elayaperumal

    SQL > t
    2 as
    (3)
    4. Select 'place (chennai.mumbai, delhi)' str
    5 double
    6)
    7 select substr (str, instr (str, ' ('), instr (str, ' ') ' ' ')-instr (str, ' (()) + 1) method_1)
    8, regexp_substr (str, ' \([^)] +-)', 1, 1) method_2
    9, regexp_replace (str, ' ([^ ()] +) (\([^)] +)', "\2") method_3
    10 t;

    METHOD_1 METHOD_2 METHOD_3
    ---------------------- ---------------------- ----------------------
    (chennai.mumbai, delhi) (chennai.mumbai, delhi) (chennai.mumbai, delhi)

    SQL >

  • selecting a value in the drop-down list but page must not get recharged again.

    Hello
    I created a drop-down list. After you have selected a value from him, I can get a value in the box of text below according to updon one sql query. but the problem is that I HAV to select Page Action when the changed value parameter to the set value and redirect. Thanks to her whenever I have to select a value from the drop-down list, page get updated. Is there a way that will satisfy the requirement but page does not get new dependants.
    I use apex 4.2.
    Thank you

    You can create A dynamic Action to set the value while changing the value in the Select list (drop-down list).

    Event: change
    Selection type: item (s)
    Article (s): choose your selection list item
    Action: Execute the PL/SQL Code
    PL/SQL code:

    begin
    select colum_name into :Px_text_item_name from table where column_name=:px_select_list_name;
    end;
    

    Page elements to send: px_select_list_name
    Page referred to return: Px_text_item_name

    Its work for me without refreshing the page. Assume that, if you want to pass this value to the element in another page, then use the branch for redirection and assign the value to the element on the page of another.

    Thank you
    Lacombe

  • Select literal values in the same column

    Hello
    like the practice:

    Select 'A', 'B', 'C' for double
    will select these values in their own column on the same line, is there a simple way to select these values in the same column on lines without first their insertion into a table?

    Thank you
    SQL> select 'A' x from dual union
      2  select 'B' x from dual union
      3  select 'C' x from dual ;
    
    X
    -
    A
    B
    C
    

    A bit complicated:

    SQL> select chr(ascii('A')+level-1) x
      2  from dual
      3  connect by level <=3;
    
    X
    -
    A
    B
    C
    

    Other:

    SQL> select regexp_substr('ABC','[[:alpha:]]',1,level) x
      2  from dual
      3  connect by level <= length('ABC');
    
    X
    ---
    A
    B
    C
    

    Max
    http://oracleitalia.WordPress.com

    Published by: Massimo Ruocchio, February 12, 2010 17:55
    added a second

    Published by: Massimo Ruocchio, February 12, 2010 17:58
    Added the third

  • When you take a Flash inside the shutter remains open as if you used no flash.

    When you take a Flash inside the shutter remains open as if you used no flash. The anti-shake icon is visible in the viewfinder before a picture is taken.

    The handshake that you see indicates that the device is set to use 1/30 of a second shutter speed or slower. This explains the symptoms you describe. There are other parameters that will allow you to do, but the first thing to check is to make sure that the flash setting is not set to slow sync menu.

  • Correspondence is not detect "------" (backslash when the backslash is given inside the brackets)

    Model matching VI does not detect "------"(back slash) when I give back slash inside the brackets, I enclose the code example I made, in this VI all the symbols in brackets except the backslash are detected. "." Anyone know what the problem is with the program. ???

    Hello

    Use a double slash [<,\\,>] inside the brackets. It will be detected.

    Kind regards

    Amine31

    (Bravo to give good answers, mark it as a solution if your problem is resolved)

  • you really need to set up a place to enter bugs.   When you select a page in the Panel of the browser, then select all, the program crashes.   Acrobat CC on el capitan mac.

    you really need to set up a place to enter bugs.   When you select a page in the Panel of the browser, then select all, the program crashes.   Acrobat CC on el capitan mac.

    Hi, Hello, Hello, Hello, bongiorno.

    ==> Feature request/Bug Report Form

    .

  • Select the value inside the digital

    For more convenience, I would that the behavior of my digital controls for automatic selection the entire value when I click on the control.  So when it gets the focus, the value should be selected.

    I don't see a way to do this.  Any ideas?  The increment on a digital buttons will select, but these data types that I put to float.  Then increment does not much sense.  In my case, I the user perforation in values with the keyboard.  It would be nice to not have to select the 0.000 already present before data entry.

    Thoughts?

    @gdargaud: with a small modification of your idea can work!

    Just to simulate a House + shift - end event to select text:

    	If (event == EVENT_GOT_FOCUS) {}
    FakeKeystroke (VAL_HOME_VKEY);
    FakeKeystroke (VAL_SHIFT_MODIFIER |) VAL_END_VKEY);
    }

    This is valid for text and digital controls.

  • How to extract the values inside the jquery element dialogue modal rigion

    Hi all

    My requeriment is

    Click report link open jquey editable modal dialog and display all values with respective ID values.

    1.I used page header HTML code below

    < link rel = "stylesheet" href = " " http://AJAX.googleapis.com/AJAX/libs/jQueryUI/1.7.2/themes/

    "Redmond/jquery - ui.css" type = "text/css" / >

    " < script src =" http://AJAX.googleapis.com/AJAX/libs/jQuery/1.4.2/jQuery.js "> < / script > .

    " < script src =" http://AJAX.googleapis.com/AJAX/libs/jQueryUI/1.7.2/jQuery-UI.js "> < / script > .

    < script type = "text/javascript" >

    $(function() {})

    () $('#ModalForm').dialog

    {

    modal: true,

    autoOpen: false,

    Width: 600

    buttons: {}

    Back: function() {}

    closeForm();

    } ,

    Approve: function() {}

    addPerson();

    },

    Return_For_Correction: function() {}

    addPerson();

    },

    Reject: function() {}

    addPerson();

    }

    }

    });

    });

    function openForm (TrxId)

    {

    Alert (TrxId);

    $s ('P3_x_trx_id', TrxId);

    $('#ModalForm').dialog ('open');

    }

    function closeForm()

    {

    $('#ModalForm_input[type="text"]').val (»);

    $('#ModalForm').dialog ('close');

    }

    function addPerson()

    {

    var ajaxRequest = new htmldb_Get (null, & APP_ID., 'APPLICATION_PROCESS is updateStatus', 0);

    ajaxRequest.add ('P3_status', $v ('P3_status'));

    var gReturn = ajaxRequest.get ();

    If (gReturn)

    {alert (gReturn)}

    on the other

    {ajaxRequest = null;

    closeForm();

    doSubmit ('SEARCH'); }

    }

    < /script >

    2. static html Id - ModalForm region

    3. region html Header-

    < div id = "ModalForm" title = "View details" style = "display: none" >

    4.footer-

    < / div >

    5. in the same page created 'extraction of line auotomatic' process by using the value of key PK P3_trx_id

    6 Jquery modal region is created but not showing values.

    Hi Dan,.

    You must create a separate page for your modal dialog box,

    Call this dialog in the parent page and pass the value modal page in some hidden item and use the value of the element to retrieve details on the modal dialog box.

    1. change your report Page-> under the header HTML

    
    

    2. change the link from which column you want to call the modal dialog box.

    Target: URL

    URL: javascript:f_modalDetails(#ID#);

    instead ID, pass the value that you want to pass to the modal dialog box that shows you the data associated with the selected line.

    3. go to the page of the form (modal dialog)

    Change your close button that closes the modal dialog box.

    Action: Redirect URL

    Target URL: javascript:window.parent.closeModalDialog();

    Close the Model dialog box using the "submit" button press

    4. create a branch on the processing section of the Page of the page of the modal dialog box

    Branch point: After Processing (After computation, validation and Processing)

    Target type: Page of this Application

    Page: Redirect to the same page

    Request: CLOSE_MODAL

    When you press the button: select the Send button

    NOTE: Branch must be before all the unconditional branch on this page

    5. create a dynamic Action on the Page modal dialog box

    Event: Page load

    Action: Run the JavaScript Code

    Code: javascript:window.parent.closeModalDialog();

    Kind regards

    Jitendra

  • Selection of setting inside the component af:table LOV

    Hi all

    I use Jdev 12 c.

    I can't find anything on the definition of the selection of a component of SelectOneChoice when it is inside a table.

    My use case: I'm iteration in a list of serial numbers, and ask a CreateWithParams liaison to a number of different parameters.  Those new lines appear in an af:table component.  One of these parameters can take the values 1, 2 or empty.  For this attribute, I have set up a selectOneChoice with a fixed/static LOV to the choice.  Now, the CreateWithParams is correctly set the value of the ViewObject line, but I don't know how to set the selection SelectOneChoice the correct value.  It is not done automatically.  Y at - it a way I can get the RichSelectOneChoice component in my managed java bean for each line so that I can manually set the selection of the component?

    Thanks for reading.

    Lance

    Solved the problem with a static list display object.  It was with my link layer.  The LOV was not part of the binding of the tree, so he was not updated correctly.  For those who have this problem in the future, put in place a static list view object and access it like a LOV in the view object related to af: table.

  • setting the selection list values in the tabular presentation

    Hi all

    I have a form of a table with a column that contains lists of selection I need to set the values for all rows in the form of tables.
    I'm trying to set the values on the click of a button, but apparently not enough to work.

    Is there another way to do it, perhaps with javascript?

    Any help would be appreciated.

    Kind regards
    Cleo

    Cleo,

    He's working now, sorry I missed the fundamental thing that you try on a selection list and not entry, as says my above entry script...

    Just use this code

    $('select[name="f10"]').val('Y');
    
    //OR this if you need to loop through them
    
    function approveAll(){
       jQuery.each($('select[name="f10"]'), function(i) {
        this.value ='Y';
      });
    }
    

    It was me!

    Published by: VC on July 13, 2012 15:57

  • Command to refresh a calculated field when you select an option from the drop-down list box

    When my form user selects an option in a drop-down list box, the value in the field (in this case, Total) I would like to update, but it isn't.

    A radio button option box makes the Total-development field to automatic update when the user clicks on the radio button. But the drop-down list box is not updated Total (without clicking away from the field). I would like to add a command in the Combo Box to refresh the Total field when you selected the option to drop-down list box.

    Someone at - it a code (Javascript?) to get there.

    Thank you very much.

    You don't need a script, simply select the 'Value selected to validate immediately' checkbox on the Options tab of the dialog list box drop-down list box field properties.

  • CH - when you type a value in the feather of a Shape in it rounds - properties

    When I type 61.2px in the value of the pen of a shape, for example, it rounds it up to 61px how can I disable this?

    Tab positioning before you click on enter.

  • Failed to retrieve the multi selection of values using the child form

    Hi all

    I'm a newbie on OIM 11 g. Need a small suggestion.

    I have a requirement that I need to display a list of all services and the user can select more than one Department. Based on the need of some departments to pick up employees of the departments.

    I created the child form and added an attribute to retrieve the departments of Looups.
    Added the child form to your Parent process.


    Can someone help me by providing the next steps to achieve this functionality.


    Thank you
    SG

    Do not know if I understood your request correctly or not, but here are my understanding:

    You have users associated with different users. You want to set up users in some RO and why you created a few model numbers for select users.

    I hope that you have some kind of relationship between departments and users
    Have a single Dataset Parent
    Create a child Dataset and have two search boxes - a Department and second for the user
    Use search queries to select user based on the selected service in Field1
    Field2 be required i.e. user

    In the same way, create two processes form Parent and child. Child form will have two fields. You can create text fields.
    After approval, the data selected on dataset will come to your child process
    Create corresponding task of the trigger for INSERTION in the definition of the process that will read data from child to process the form and arrangement of these users. (Research Forum or go through Oracle Docs to learn more about these triggers to child form)

Maybe you are looking for

  • (Redirected) O Dell

    I bought Dell Inspiron model 5th i7 of gen very recently and he got almost dead for no visible reason, when approached for the service after sales and technical support, I was left unattended, with only 2 complaints in hand. Now what to do with this

  • New keyboard shortcuts at random does not work

    HelloI'm under first 2015.4 on an iMac and I'm having a problem where I put the a new shortcut for the path select tool, and it still doesn't work.  All the other shortcuts are beautiful, and I re-kept my shortcut profile.  When I restarted the compu

  • Delete the data in partitioned tables

    HelloOracle 11.2.0.3.0 version, running on Linux Enterprise.I need to remove all the data from two tables (several 100 million lines each) that are partitioned.(1) table 1 is a partition table have varied to a DATE column(2) Table2 is a partition of

  • How to get the name of the package to a procedure used in a workflow process activity

    Hi all. I'm on OWB 11.2.0.2.0. When I used a function or a procedure that is packed for a mapping operator, I can find the name of package.program_unit by getting FUNCTION_NAME property of the operator. For example,.OMBRETRIEVE MAPPING "$mapName" OPE

  • Avoiding the TRUNC as a condition of setting for the date of transaction

    I've never noticed this before, but tonight I have tested a query and made a trunc (mmt.transaction_date) between April 1, 2012"and 20 April 2012 ' in TOAD and I noticed it was taking a long time to run. If I remove the trunk and use mmt.transaction_