I want to remove bind variables in my data like & and many

I have a field that holds description of a code and this is having bind variables (special characters). I need to remove them and replace with no value.
I was trying with following sql and the dialog box (Enter Substitution Variable)is opening when I tried to execute the sql.
select regexp_replace('B VOC AC & HEATING (*[[:punct:]])', '') from dual;
please provide me the SQL how to do this
Thanks in advance

Hi,
It looks like your question is about Substitution Variables, that typically look like &start_date or &1.  Bind Variables are completely different.
By default, SQL*Plus, and some other front ends, expect that & will be followed by a substitution variable name.  If you're not using substitution variables, and you want to treat & as a normal character, then use Pablolee's suggestion.  SET DEFINE OFF will make SQL*Plus treat & as a normal character until you end the SQL*Plus session, or you explicitly cancel it by saying SET DEFINE ON.
By the way, did you mean to call REGEXP_REPLACE with 2 arguments, like you posted
select regexp_replace('B VOC AC & HEATING (*[[:punct:]])', '') from dual;
or with 3 arguments, something like this
select  regexp_replace ( 'B VOC AC & HEATING'
                       , '(*[[:punct:]])'    -- Round parentheses, '(' and ')', are not doing anything in this case
                       , ''                  -- NULL might be clearer
from    dual;
?  Also, '*' in a regular expression p
attern, means "the last item can occur 0 or more times".  In your code, there isn't any "last item" before the '*',  What are you trying to do?  Post some sample data (CREATE TABLE and INSERT statements) for a few different sample cases, and the results you want from that sample data.
See the forum FAQ: https://forums.oracle.com/message/9362002

Similar Messages

  • Setting bind variable value programmatically for master and child VO's

    Defined following BC:
    Serv VO - Master VO, has Bind_cNum (bind variable)
    ServDetail VO - Child VO, has Bind_cNum2 (bind variable)
    ServViewLink VL - View link between Serv VO & ServDetail VO
    in AMModule Impl have custom WS:
    public List<ViewRowImpl> getMyServices(String cNum)
    List<ViewRowImpl> result = new ArrayList<ViewRowImpl>();
    ViewObjectImpl vo1 = getServ(); //Master VO
    vo1.setNamedWhereClauseParam("Bind_cNum", cNum);
    vo1.setForwardOnly(true);
    ViewObjectImpl vo2 = getServDetail(); //Child VO
    vo2.setNamedWhereClauseParam("Bind_cNum2", cNum);
    vo1.executeQuery();
    while (vo1.hasNext()) {
    result.add((ViewRowImpl)vo1.next());
    return result;
    I am passing same cNum parameter to both Serv VO (Master VO) and ServDetail VO (child VO) as above. (this is in addition to view link bind variable :Id)
    It shows in the logs that it is setting the values correctly:
    <ViewRowSetImpl> <setNamedWhereClauseParam> [382] Serv ViewRowSetImpl.setNamedWhereClauseParam(Bind_cNum, 11771370)
    <ViewRowSetImpl> <setNamedWhereClauseParam> [383] ServDetail ViewRowSetImpl.setNamedWhereClauseParam(Bind_cNum2, 11771370)
    <ViewRowSetImpl> <doSetWhereClauseParam> [383] Serv ViewRowSetImpl.doSetWhereClause(-1, Bind_cNum, 11771370)
    <ViewRowSetImpl> <execute> [385] Serv ViewRowSetImpl.execute caused params to be "un"changed
    <OracleSQLBuilderImpl> <bindParamValue> [394] Binding param "Bind_cNum": 11771370
    <ADFLogger> <addContextData> Execute query
    -- when executing view link
    <ViewRowSetImpl> <setParamValues> [425] ServViewLink_0 ViewRowSetImpl.setParamValues params changed
    <ViewRowSetImpl> <doSetWhereClauseParam> [426] ServViewLink_0 ViewRowSetImpl.doSetWhereClause(-1, Bind_cNum2, null)
    <ViewObjectImpl> <bindParametersForCollection> [436] For RowSet : ServViewLink_0
    <OracleSQLBuilderImpl> <bindParamValue> [437] Binding null of type 12 for "Bind_cNum2"
    <OracleSQLBuilderImpl> <bindParamValue> [438] Binding param "Bind_Id": 5018
    from above log, when ServViewLink_0 is executed, it is changing Bind_cNum2 bind variable to null.
    how can i pass same bind variable value to both Master and Child view objects from AM Impl.java
    Edited by: bsrao on Oct 11, 2012 6:07 PM
    Edited by: bsrao on Oct 11, 2012 6:10 PM
    Edited by: bsrao on Oct 11, 2012 6:12 PM

    Try executing the vo1 query before setting the bind variable for vo2, then execute the vo2 query (if that's what you want to do).

  • How to use Bind Variables in Essbase data control

    Hi,
    I am trying to use Bind Variables in MDX query while creating the Essbase Data Control. I have used the below query with the Bind Variable.. this query is working in Essbase admin console..but it is throwing error (*Invalid MDX Query)* while creating Essbase Datacontrol in JDeveloper.
    MDX Query : SELECT {[Measures].Msr_2} ON COLUMNS, [Time].Children ON ROWS FROM cube
    where ($name)
    Could any body suggest me on how to use bind variables with Essbase Data control.
    Thanks,
    Swathi

    Hello Swathi, can you please help me how you created Essbase DataControl? Also were you able to figure out this?
    Thanks, Praveen.

  • I have an original iPhone running version 2.2.1.  I wish to get rid of the phone, but before discarding it I want to remove the email records, phone book information, and photos.  I would like to leave the other apps in place.  Any suggestions?

    I have an original iPhone running version 2.2.1.  I wish to get rid of the phone, but before discarding it I want to remove the email records, phone book information, and photos.  I would like to leave the other apps in place.  Any suggestions?

    Delete you mail account on the phone and disable to sync your mail account in the info pane in iTunes with your phone connected, same for contacts. Also deselect photo syncing in the photo pane. After the following sync, your mail, contact and photos should be gone.
    Photos inside the camera roll have to be deleted on the phone.
    Remember, that apps only can be used with the account they were bought with. If the phone will be set up with a different iTunes account, all of your apps will be removed.
    Message was edited by: Ingo2711

  • SOLVED -Newbie with Bind Variable Issue in Data template

    My XML output looks the way I want it structure-wise, but the data is the same for each group. Obviously my bind variable never gets updated. How can this be achieved? Here are the dataquery and data structure parts of my template:
    <dataQuery>
              <sqlStatement name="Q1">
              SELECT DISTINCT trans_id FROM table1
    </sqlStatement>
              <sqlStatement name="Q2">
                   <![CDATA[SELECT * from table1 WHERE report_type = 'invoice' and record_type = 'HEADER' AND trans_id = :trans_id]]>
              </sqlStatement>
              <sqlStatement name="Q3">
                   <![CDATA[SELECT * from table1 where report_type = 'invoice' and record_type = 'LINE'  AND trans_id = :trans_id]]>
              </sqlStatement>
              <sqlStatement name="Q4">
                   <![CDATA[SELECT * from table1 where report_type = 'PSA_INV' and record_type = 'FOOTER'  AND trans_id = :trans_id]]>
              </sqlStatement>
         </dataQuery>
    <dataStructure>
    <group name="ONE" source="Q1" groupFilter="">
                   <element name="trans_id" value="trans_id" function=""/>
                   <group name="HEADER" source="Q2" groupFilter="">
                        <element name="Direct_Inquiries_To" value="ATT1" function=""/>
                        <element name="Tax_Id" value="ATT2" function=""/>
                        <element name="Bill_To_Address_Line1" value="ATT3" function=""/>
                        <element name="Bill_To_Address_Line2" value="ATT4" function=""/>
                        <element name="Bill_To_Address_Line3" value="ATT5" function=""/>
                        <element name="Bill_To_Address_Line4" value="ATT6" function=""/>
                        <element name="Bill_To_Address_Line5" value="ATT7" function=""/>
                   </group>
                   <group name="LINE" source="Q3" groupFilter="">
                        <element name="Line_No" value="ATT1" function=""/>
                        <element name="Desc_Line1" value="ATT2" function=""/>
                        <element name="Amount" value="ATT3" function=""/>
                        <element name="Desc_Line2" value="ATT4" function=""/>
                        <element name="Amount_Line2" value="ATT5" function=""/>
                                       </group>
                   <group name="FOOTER" source="Q4" groupFilter="">
                        <element name="Sub_Total" value="ATT1" function=""/>
                        <element name="Taxes" value="ATT2" function=""/>
                        <element name="Net_Amount" value="ATT3" function=""/>
              </group>
         </group>
    </dataStructure>
    I have 2 possible transids
    The transid gets updated in the 1st group , but the rest of the data is the same as the first trans_id.
    Message was edited by:
    user647407

    "What do you mean by 'Obviously my bind variable never gets updated' - are the sub queries not getting the trans_id from the first query ?"
    yes, that would appear to be the case. It only gets one value of the transid. To put it in a better perspective, I'll compare it to the Employee example in the user's guide. My Depts would all come out fine. But Dept 10, 20, etc would all show the employee data for dept 10 only.

  • Using bind variable in dynamic where clause and concatenate with query

    Hi,
    In my procedure i am framing where clause dynamically with bind variable,When i am concatenate this with my sql query for REF CURSOR i got sql command not properly ended exception.
    Is it possible to pass values to the bind variable through the dynamic variable/value?
    Please advise
    Thanks in advance
    Siva
    IF in_applicationId IS NOT NULL THEN
              optional_where := optional_where || ' AND a.APPLICATION_ID like '||':e%';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'||',in_queue_id'||',in_applicationId';
         END IF;
    My query is like this
    open Out_Main FOR SelectQuery USING optional_using

    Thanks for reply,
    In my procedure, i suppose to frame the where clause with bind dynamically according to the input parameters. so that i am framing the values of the bind variables also dynamically like this,
    Please advise...
    IF in_assignedAppFlag IS NOT NULL THEN
              IF in_assignedAppFlag = 'Y' THEN
                   optional_where := optional_where || ' AND b.ASSIGNED_TO = :b' ;
              optional_using := ' in_appFuncGroup'||',in_currentUserID';          
              ELSe
                   IF in_isSupervisor = 0 THEN
                        optional_where := optional_where || ' AND (b.ASSIGNED_TO = :b'||' OR b.ASSIGNED_TO = ''-1'' OR b.ASSIGNED_TO IS NULL)';
              optional_using := ' in_appFuncGroup'||',in_currentUserID';
                   END IF;
              END IF;
         ELSE
              IF in_isSupervisor = 0 THEN
                   optional_where := optional_where || ' AND (b.ASSIGNED_TO = :b'||' OR b.ASSIGNED_TO = ''-1'' OR b.ASSIGNED_TO IS NULL)';
                   optional_using := ' in_appFuncGroup'||',in_currentUserID';
              END IF;
         END IF;
         IF in_appFuncGroup IS NOT NULL THEN
              optional_where := optional_where || ' AND e.APP_FUNC_GROUP= :c';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup';
         END IF;
         IF in_queue_id IS NOT NULL THEN
              optional_where := optional_where || ' AND b.QUEUE_ID = :d';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'||',in_queue_id';
         END IF;
         IF in_applicationId IS NOT NULL THEN
              optional_where := optional_where || ' AND a.APPLICATION_ID like '||':e%';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'||',in_queue_id'||',in_applicationId';
         END IF;
         IF in_sourceCode IS NOT NULL THEN
              optional_where := optional_where || ' AND e.APP_SOURCE_CODE like '||':f%';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
              ||',in_queue_id'||',in_applicationId'||',in_sourceCode';
         END IF;
         IF in_logo IS NOT NULL THEN
              optional_where := optional_where || ' AND appProds.PRODUCT_TYPE like '||':g%';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
              ||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo';
         END IF;
         IF in_firstName IS NOT NULL THEN
              optional_where := optional_where || ' AND upper(a.FIRST_NAME) like upper(:h%)';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
              ||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo'||',in_firstName';
         END IF;
         IF in_surName IS NOT NULL THEN
              optional_where := optional_where || ' AND upper(a.SURNAME) like upper(:i%)';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
              ||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo'||',in_firstName'||',in_surName';
         END IF;
         IF in_retreival_id IS NOT NULL THEN
              optional_where := optional_where || ' AND e.RETREIVAL_ID like :j%';
              optional_using := ' in_appFuncGroup'||',in_currentUserID'||',in_appFuncGroup'
              ||',in_queue_id'||',in_applicationId'||',in_sourceCode'||',in_logo'||',in_firstName'||',in_surName'||',in_retreival_id';
         END IF;

  • How do I use the Session State to manage bind variables & download xml data

    I have a Report Query with more than 30 queries; many have bind variables in them. I'd like to create sample xml so that I can develop my word templates. When I try to download the XML data Source for Layout, it doesn't ask for the bind variable values.
    How can I download the XML data without replacing the bind variable values in each of the queries?
    Thank you.

    If you are using the Standalone version, then first of all make sure to UNCHECK (BIP10g 10.1.3.4.1)
    "AUTO RUN" (it is under General Settings when you select your Report Definition)
    Next, you should define the parameters in the corresponding parameter Section.
    Its simplest form is of "Text" type so you will have to enter values at runtime.
    Then these parameters can be used in your query as bind variables.
    When you run the report it will prompt for parameter values. Enter these values
    and you would get a sample of your XML data.
    This should work and you should not find any issues.
    regards
    Jorge

  • I want to remove my credit card from my account and only use gift cards for purchases. How can I delete my card number?

    I want to delete my credit card from my account and only use gift cards.  How can I delete my card number?

    You'll want to get in touch with ITunes support for this. Normally when you start an account with the CC you can't remove it yourself. But by contacting iTunes they can get that taken off for you.
    Use this link to get in touch with the iTunes advisors
    http://www.apple.com/lae/support/itunes/contact.html

  • Exception caused by bind variables in ORDER BY clause and VO RANGE_PAGING

    Hi,
    I'm using a ViewObject in RANGE_PAGING mode and discovered a problem when using bind variables in the ORDER BY clause of my statement:
    SELECT * FROM (SELECT /*+ FIRST_ROWS */ IQ.*, ROWNUM AS Z_R_N FROM (
      SELECT * FROM T_TABLE WHERE (attr1 = :1) ORDER BY decode (attr2, :2, 1, null, 0, -1) desc, attr3 ) IQ 
      WHERE ROWNUM < :2) WHERE Z_R_N > :3 When a bind variable is used in the ORDER BY CLAUSE and the method VO.getEstimatedRowCount() is call then the DB issued an SQL error:
    java.sql.SQLException: Ungültiger Spaltenindex (eng.: invalid column index)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:239)
         at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:4612)The numbering of the bind variables indicates that the last two bind variables have the wrong numbering (??)
    When I rewrite the SQL into the following statement, the SQL error does not occur but I have not verified yet that the VO delivers the correct range of data because the numbering of the bind variables is not correct.
    SELECT * FROM (SELECT /*+ FIRST_ROWS */ IQ.*, ROWNUM AS Z_R_N FROM (
      SELECT *, decode (attr2, :1, 1, null, 0, -1) as ATTR_FOR_SORTING FROM T_TABLE WHERE (attr1 = :2) ORDER BY ATTR_FOR_SORTING  desc, attr3 ) IQ 
      WHERE ROWNUM < :2) WHERE Z_R_N > :3I'm working with JDev 10.1.2 and Oracle DB 9203.
    Any comments are welcome!
    Thanks,
    Markus

    You are using the bind variable :2 twice. Did you try
    SELECT * FROM (SELECT /*+ FIRST_ROWS */ IQ.*, ROWNUM AS Z_R_N FROM (
      SELECT * FROM T_TABLE WHERE (attr1 = :1) ORDER BY decode (attr2, :2, 1, null, 0, -1) desc, attr3 ) IQ 
      WHERE ROWNUM < :4) WHERE Z_R_N > :3
    setWhereClauseParm(0, "a"); // :1
    setWhereClauseParm(1, "b"); // :2
    setWhereClauseParm(2, "c"); // :3
    setWhereClauseParm(3, "b"); // :2setting the fourth parameter the same as the second one?
    I remeber reading something about using bind variables twice causing problems, but I#m not sure about it.

  • I want to remove my account from my old computer and move it to my new one?

    I just purchased a new computer and need to move my creative cloud to my new computer. How do I do this?

    navigate to Adobe: Creative, marketing, and document management solutions with your new pc and start downloading your programs.
    if you want to remove your programs from your old computer, open your cc desktop app and sign out before uninstalling everything cc.

  • I want to remove firefox. I find it intrusive and I am very satisfied with safari

    I have no use for firefox and I want to remove it from my computer. i installed it long ago and never used it. recently it intrudes on everything . I have no need for two browsers and I am satisfied with safari.

    Did you try the steps in this article?? [[Uninstall Firefox from your computer]]

  • I Want Get Removed My Apple ID Account From Apple And Create Again.

    I Want TO Delete MY Apple Id Account From Apple And Create Again,

    You can't delete an account, all you can do is remove personal info from it and stop using it - any content that you downloaded with the account will remain tied to the account. If you want to use its email address on another account then you will need to replace it on that account first e.g. by tapping on it and logging into it via Settings > iTunes & App Store on your iPad, the Store > View Account menu option on your computer's iTunes, or via http://appleid.apple.com

  • I want to remove iCloud (shock, horror) because its like pulling teeth...

    Hi..
    I wish to delete iCloud and revert to my mac running as before. This is because of many issues but mostly because my mac (which has been trouble free for 3/4 years) is behaving badly, as well as my other devices. So much so that I am sending it to its room until I resolve things.
    Everything has slowed down so much its like walking uphil through treacle. The amount of free memory seems to have a mind of its own changing frequently from 21GB down as low as 2GB as one alarming stage. (The total memeory on my mac is 319GB). Seems to always be something going on in the background (you can hear the little virtual brain ticking over and over).
    Now none of the above may have anything to do with said Icloud....but.....
    I would rather delete the icloud bit and see if that makes the difference.
    I can always get on board the cloud express again later.
    My questions are...
    1. How do I remove Icloud from my mac, my phone and my ipad....
    2. Will I lose anything on my mac by doing so. My mobile me account naturally stopped the moment I jumped aboard he party
    Thank you
    Kevan
    Mac OS Lion 10.7.2

    About email -  iCloud provides an email service use the me.com and mac.com addresses.  If you are using these for your email account, then yes, emails will be lost.  If you have a different email provider, like gmail or a corporate account, then they have nothing to do with icloud and will not be lost.
    Abour documents - you'll lose anything that has been copied to and stored in iCloud.  If you copied Pages documents to iWork in icloud, then be sure you have local copies.
    About calendars, contacts - If you look in your mac's applications (iCal, Address book), you'll find calendars and contacts listed under either "On my mac" or "icloud", just drag everything in icloud to on my mac.  However, I believe that if you try disconnecting from icloud, you'll be given the chance to have all the data kept locally on your mac.  -- hopefully Winston will see this and comment.  Or anyone else??
    UPDATE:  check this thread -
    https://discussions.apple.com/thread/3976245?tstart=0
    Message was edited by: pvonk

  • Want to remove the metadata/keywords panes... and it looks like I should be able to!

    But I can't, and it makes me sad. Tempt me by using the same tab motif of the palettes within Photoshop, where tabs can be torn off into new panels, and removed for the workspace, and then cruelly deny me tabbed palette functionality.
    This is the second of two observations about Bridge, both of which are focusing on the use of inappropriate UI conventions for functions within the application. Don't make a field look like it can accept typed input if it can't. Don't make a thing look like a tabbed palette if it isn't one. There are other UI conventions you can use that won't cause the confusion (but of course, the better option in both observations is to make the things in fact what they look like they are.)

    Deebs, that hides the whole pane. I want the metadata/keywords gone, but still see the favorites.
    And, as a UI designer, I want the UI to behave like the UI implies it will behave. They appear to be tabbed palettes but do not behave like tabbed palettes.
    So you may want to keep your sarcasm to yourself.

  • I want to remove the yahoo search bar from Firefox and use the google search bar.

    I did go to about:config and made the keyword.URL to default (Google). It is not getting affected. Please help me to know how can I set it in Firefox.
    I need to remove yahoo search from my Firefox and use the Google search. I did the following steps for the same.
    about:config, searched keyword:URL and reset to default.
    But the change is not getting affected. Pls help

    Work around that I have used (my machine is running Windows XP SP3 might work on other systems as well):
    1) Ensure Firefox is closed, if necessary read this in another browser
    2. Open the Firefox directory on the hard drive (typically: C:\Program Files\Mozilla Firefox)
    3. Go into the 'searchplugins' folder
    4. Delete the file named 'yahoo.xml'
    5. Immediately restart your machine

Maybe you are looking for