CONTAINS Operator using ESCAPE character

I must to do a SELECT sentence with a column with a domain index using CONTAINS. I need to look for a text that includes "%", but I want that the query recognizes it like literal and not like joker. I proved using the escape characters "\" and "{}", but I do not know if it does consider to the character "%" or if it uses it like comodín. The query is the next (if i need to find "6%"):
SELECT v.campo1, v.campo2
FROM promo_busqueda_leyes.s_version_xml v
WHERE contains (v.campo_xml, '(6\%)', 1)>0
or
SELECT v.campo1, v.campo2
FROM promo_busqueda_leyes.s_version_xml v
WHERE contains (v.campo_xml, '(6{%})', 1)>0
what am I making wrong?

if i understood correctly, try like this....
use INSTR instead of CONTAINS ie
WHERE contains (v.campo_xml, '(6\%)', 1)>0WHERE INSTR (v.campo_xml, '(6\%)', 1)>0

Similar Messages

  • Urgent Help - in using Escape character

    hai,
    i have problem in using escape character..
    can anyone help me out in the same...
    sb.append(<jsp:getProperty name="resume_main" property="name"/>);
    //error i am getting is -- Missing term, ')' expected.
    pl help me out in using the escape character in the above statement.
    thanx in advance
    regards
    koel

    try
    sb.append("<jsp:getProperty name='resume_main' property='name'/>");
    or
    sb.append("<jsp:getProperty name=\"resume_main\" property=\"name\"/>");
    both will work

  • How to use escape character in update statement.

    Hi All,
    I'm trying to update table using following sql update statement, but everytime it's asking me for the input due to the '&' value in below sql.
    UPDATE xyz_xyz
       SET NAME = 'ABC & PQR'
    WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C & PQR');Please let me know how to use escape character syntax or let me know if there is any alternative solution.
    Thanks,
    Vishwas

    Hi,
    By default, & marks a substitution variable name.
    If you're not using substitution variables in that statement (or, if this is in PL/SQL, in that entire package or procedure) then the easiest thing to do is just diable substitution variables; then & will be a normal character:
    SELECT  DEFINE  OFF
    UPDATE xyz_xyz
       SET NAME = 'ABC & PQR'
    WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C & PQR');
    SET  DEFINE  ONIf you can't do that, then & is always taken literally if it comes right before a single-quote, so you could say:
    UPDATE xyz_xyz
       SET NAME = 'ABC &' || ' PQR'
    WHERE ID = (SELECT ID
                   FROM abc_abc
                  WHERE NAME = 'C &' || ' PQR');There is a SQL*Plus "SET ESCAPE" command, too, but if you use it, you have to worry about whether the escape character is to be taken literally or not.
    SET   ESCAPE  \Yet another alternative is to make some other character, such as ~, mark the substitution variables:
    SET  DEFINE  ~Read all about them in the SQL*Plus manual.
    http://download.oracle.com/docs/cd/B28359_01/server.111/b31189/ch2.htm#sthref103

  • Export Data Using Escape Character

    Hi All
    I have got a requirement where i need to export data from oracle with escape character.
    eg. I am using a delimiter 237(í) and if the same character is present in data it should be escaped by escape character eg. /.
    Once this file will get created i need to load this file in Netezza database which supports escape character.
    Data in oracle table
    FirstName     Lastname     Designation
    abc     xyz     mnz
    def     ghío     pqr
    Data should be exported like below
    FirstnameíLastnameíDesignation
    abcíxyzímnz
    defígh/íoípqr
    Thanks.

    943994 wrote:
    Thanks for the reply. I am new to Oracle and i am not able to find any command for exporting data in Oracle. I know we can do it manually using select statement but in that case we need to replace this delimiter with escape character and delimiter for all char fields.
    In netezza we can directly do that without this. Please see below example and let me know if any such thing is present in Oracle.
    SQL> CREATE EXTERNAL TABLE '/temp/test.csv' USING (REMOTESOURCE 'ODBC' DELIMITER 236 DATESTYLE 'YMD' DATEDELIM '-' TIMESTYLE '24HOUR' TIMEDELIM ':' MAXERRORS 0 ESCAPECHAR '\' NULLVALUE '' ) AS SELECT * FROM temp;
    .CSV file created by above command:
    abcíxyzímnz
    defígh/íoípqr
    Thankshttp://docs.oracle.com/cd/E11882_01/server.112/e22490/et_params.htm#sthref1293

  • Using Escape character for Multi character delimiter for flat files in IKM

    Hi
    I have an IKM using Jython, it is working fine for single character delimiter. But as per requirement I have to use multicharacter delimiter ;" (semi colon and double quotes).
    I am taking this into variable using
    filesep = "<%=snpRef.getSrcTablesList("", "[SFILE_SEP_FIELD]", "", "")%>"
    but it is giving lexical error.
    Can anybody help me with the use of escape character in current scenario?
    Any other suggestions are also appreciated.
    Thanks
    Ankit

    Hello,
    A small tweak may solve your problem:
    Instead of :
    CONCATENATE wa_condstr ' bukrs = ' pa_bukrs INTO wa_condstr SEPARATED BY space.
    Use:
    CONCATENATE wa_condstr ' bukrs = ' 'PA_BUKRS' INTO wa_condstr SEPARATED BY space.
    Then use this in SELECT.
    Anyways for your answer the escape character for apostrophe is an apostrophe )
    Try this you will understand:
    DATA:
    V_STR TYPE STRING VALUE ''''.
    WRITE: V_STR.
    BR,
    Suhas

  • Using Escape character in UPDATE statement

    SELECT REPLACE
              ( REPLACE
                     ( REPLACE( REPLACE( REPLACE( REPLACE( BODY, '<STARTOFLINK>' )
                                                , '<ENDOFLINK>' )
      FROM ARTICLEI need to use the above in an UPDATE statement to remove some HTML tags from a CLOB column. However when I run the script it asks for the substitution variables for the '&' characters. I've tried "ESCAPE '\'" but I think you can only use that with a like operand.
    Any suggestions?
    Message was edited by:
    Terrible
    As you can see the HTML tags have been converted in this post!! I'm trying to remove:
    & amp;
    & quot;
    & ndash;
    & #039;

    This may help;
    SQL> create table t (col1 varchar2(200))
    Table created.
    SQL> insert into t values('<STARTOFLINK>')
    PL/SQL executed.
    SQL> insert into t values('<ENDOFLINK>')
    PL/SQL executed.
    SQL> insert into t values(chr(38) || 'amp;')
    PL/SQL executed.
    SQL> insert into t values(chr(38) || 'quot;')
    PL/SQL executed.
    SQL> insert into t values(chr(38) || 'ndash;')
    PL/SQL executed.
    SQL> insert into t values(chr(38) || '#039;')
    PL/SQL executed.
    SQL> insert into t values('<STARTOFLINK>link<ENDOFLINK> '
                       || '  AMP:' || chr(38) || 'amp;'
                       || '  DQT:' || chr(38) || 'quot;'
                       || '  DASH:'|| chr(38) || 'ndash;'
                       || '  SQT:' || chr(38) || '#039;')
    PL/SQL executed.
    SQL> select * from t
    col1                                                                           
    <STARTOFLINK>                                                                  
    <ENDOFLINK>                                                                    
    <STARTOFLINK>link<ENDOFLINK>   AMP:&  DQT:"  DASH:–  SQT:' 
    7 rows selected.
    SQL> select regexp_replace(
              regexp_replace(
                 regexp_replace(
                    regexp_replace(
                       regexp_replace(col1, '<.*OFLINK>',NULL),
                    chr(38) || 'amp;', chr(38)),
                 chr(38) || 'quot;', chr(34)),
              chr(38) || 'ndash;', chr(45)),
           chr(38) || '#039;', chr(39))
    new_col from t
    NEW_COL                                                                        
       AMP:&  DQT:"  DASH:-  SQT:'                                                 
    7 rows selected.Message was edited by:
    MScallion
    The SELECT * values were not as they are displayed due to HTML conversions.

  • Container operation step in BPM using context object

    Hi all,
    in my BPM I have a send step using the file adapter. The file adapter builds a dynamic filename.
    Now I want to have the filename back into an acknowledgement. First, I need it in the container, right?
    So after the send step, I have a container operation step as follows:
    target: simple string
    mode: assign or append, doesn't matter
    expression: In expression editor, I select Interface variable 'message', then context object 'FileName' from namespace http://sap.com/xi/XISystem/File
    This should be the filename from the fileadapter, right?
    In SXI_Cache, I get return code 99:
    The Value of Expression '&MESSAGE.FILENAME&' Cannot Serve As the Source of an Assignment
    Why is there a context object, if you can' t use it??

    As far as I know, the filename in the Dynamic Header will be lost in when the message enters the BPM.
    As a work around, make a mapping at the Interface Determination level that reads the filename from the SOAP header and sets it into the payload which can be accessed inside the BPM.
    Reason the way I see this that the BPM does not store the filename is ,
    1. What if you have multiple receive steps in the BPM with a fork.
    2. How would the context object know which filename you want to read?
    The reason you see this in the context object is because all Context Objects are the info you get from the Adapter metadata.
    Regards
    Bhavesh

  • Using Container operation step can i pass one table to another?

    hi
    i have 2 multiline container elements in the workflow.
    in one of my step i am sending email using the receipents from the table LT_RECLIST which is a multiline container. Now before this step i am using a container operation step to pass LT_RECLIST_FINAL to LT_RECLIST. But guess this is not working? is this possible?
    the condition in container operation step is like this
    Result Element   LT_RECLIST
    Assignment         =     Assign (contents of table are deleted first)
    Expression          &LT_RECLIST_FINAL&
    Operator
    any idea where i am going wrong?

    instead of
    =     Assign (contents of table are deleted first)
    try the followinng option.
    <-    Add only to table (contents are extended)
    or you can directly use the element LT_RECLIST_FINAL in your mail step instead of assigning it to LT_RECLIST and using this element. if both the elements are going to store the same values then there is no point in using a separate element.

  • Error (Error when starting a SWITCH branch) while using container operation

    HI Experts,
    I am using container operation step for moving internal table (ref to sflight) to workarea.The error I found in the log is ' Error when starting a SWITCH branch'.Kindly help me in finding the solution.Below are the steps and code.
    Result Element = lw_sflight             (Element ref to sflight with export and Import)
    Assignment     =    =                     (Assign (contents of table are deleted first)
    Expression      = &FLIGHT&             (Multi line container ref to sflight)
    Operator          = Assignment
    Expression      =                                 (Blank)
    Thanks and Regards,
    Srini

    Hello,
    Maybe you should show more information about the condition step instead of the container operation step.
    A previous poster in SDN said they solved their problem by changing the order of the conditions.
    regards
    Paultje Bakker
    Hanabi Technology

  • How to use "Contains" operator

    Hi All,
    I'm trying to use oracle text with the Contains operator. But I'm experiencing troubles.
    When I have only one condition with the Contains operator the query works fine :
    SELECT ObjectID
    FROM T_Object
    WHERE Contains (Title, 'english', 1) > 0
    But when I add a second contains clause it does not work anymore:
    SELECT ObjectID
    FROM T_Object
    WHERE Contains (Title, 'english', 1) > 0
    OR Contains(ShortDescription, 'english', 1) > 0;
    here is the error message :
    ERROR LINE 4 :
    ORA-29907: Double lables detected in primary calls.
    I must admit that the error message is quite clear but I still can't understand why the query does not work.
    Any help will be very appreciated.
    Kind regards.

    Change the label in the 'OR' part of the select statement and try.
    SELECT ObjectID
    FROM T_Object
    WHERE Contains (Title, 'english', 1) > 0
    OR Contains(ShortDescription, 'english', 1) > 0;
    Try:
    SELECT ObjectID
    FROM T_Object
    WHERE Contains (Title, 'english', 1) > 0
    OR Contains(ShortDescription, 'english', 2) > 0;

  • Alrt with field Lelvel Info - By using Container Operation and Control step

    HI,
    I have developed File to File scenario from /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated
    I created Integration Process in IR with two BPM steps Receive and Send step.
    Since I need a filed level info on alerts...I have included Container Operation and Control steps in between receive and send like..
    Receive --- Container Operation --- Control step -
    Send
    And now I have created the Alert category in Alrtcatdef and used the same category in control step.
    I have tested the above scenario with error message ( with mapping fail )...But I am unable to find the alert in the system?!!
    ---S

    HI Stallin
    Did alert generated by BPM itself. Check with BPM workflow.
    Another thing while generating alert from BPM, standard alert element will not work with BPE engine. Create elements for the same
    Thanks
    Gaurav

  • Contains Operations and Move Percentage

    Hi,
    I am newbei in ABAP programming and rather stuck in these Problem, while doing a exercise.
    Can any one explain me, how can i do it.
    Problem 1:
    <u><b>Move Percentage</b></u>
    Data mc1(10) TYPE c VALUE 'ABCDEFGHIJ'.
    <b>Use MOVE cmd with PERCENTAGE addition to display</b> output ‘ABCD’ left-aligned & right-aligned
    Problem 2:
    <u><b>Contains Operations</b></u>
    Data test(50) type c value ‘Today is a wonderful day’.
    <b>Check if it contains any numeric character</b>     
    Data num_var(6) type n value ‘12345’.
    <b>Check if it contains all numeric values</b>
    Also, Can u explain me OVERLAY String operation with a example. I am a bit confused in understanding this Operation.
    Thanks in Advance.
    Samir

    Hi Samir,
    Try this..
    Problem 1:
    Data: mc1(10) TYPE c VALUE 'ABCDEFGHIJ',
          mc2(10).
    move mc1 to mc2 percentage 40 left.
    write:/ mc1,mc2.
    move mc1 to mc2 percentage 40 right.
    write:/ mc1,mc2.
    Problem 2:
    Data: test(50) type c value ‘Today is a wonderful day’,
           test2(10) value '1234567890'.
    if test ca test2.
    write:/ 'data contains a numeric character'.
    endif.
    Data: num_var(6) type n value ‘12345’,
          num(10) value '1234567890'.
    if num_var co num.
    write: / 'Only mumeric values'.
    endif.
    Example for OVERLAY:
    DATA: WORK(20) VALUE 'Th t h s ch ng d.',
          HELP(20) VALUE 'Grab  a   pattern'.
    OVERLAY WORK WITH HELP.
    WORK now contains 'That has changed.' and the system field SY-SUBRC is set to 0.
    Regards,
    Suresh Datti

  • How to escape "&" character ?

    I want to execute the following statement in sqldeveloper
    select '&sdfas' from dual
    and expect the outcome to be the string "&sdfas"
    but sqldeveloper keep asking me for the value of "sdfas" argument, and replace it.
    I use sqldeveloper to run sql script to patch many pl/sql packages in my company. The packages, unfortunately, contain some "&" characters in rather critical position. And my last few days is spent chaotically trouble-shooting this.
    Any method to escape "&" character ? I tried to export DDL with sqldeveloper itself but the outcome is still not being escaped properly.

    Sake,
    You can use the following to escape the &:
    set define off
    It's also possible to set another character to use for substitution variables.
    See the online documentation: http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm#i2698854

  • Escape character before dot in dn entry after OID provisioning

    Our OIM users are auto provisioned to OID using out of box OID connector. Everything works fine other than this issue.
    When value for OIM's "User login" contain the character dot (say BILLY.BOB) , the corresponding dn entry in OID is created with an escape character (dn: uid=BILLY\.BOB,cn=users,dc=abc,dc=com) .
    Example :
    OIM's 'User Login' = BILLY.BOB
    OID Entry created as
    dn: uid=BILLY\.BOB,cn=users,dc=abc,dc=com
    givenName: Billy
    uid: BILLY.BOB
    cn: Billy Bob
    Note that the uid does not get the escape character, only the dn value is getting affected.
    Thanks in advance!
    Kabi

    You need to remove . in the Lookup defintion which comes with OOTB connector.
    Re: OID Connector.User Id includes "\" when seen through ODSM

  • Store Filename in Container Operation of BPM?

    Hi,
    Is it possible to store filename in Container Operation of BPM step? I know that using mapping and assigning that field to Container Operation can be done.
    But, is it possible to do without using payload field assignment?
    Regards,
    Ashish

    That seems to be the only possible way. Bcoz the filename in the dynamic header is lost when the message enters BPM.
    Regards,
    Prateek

Maybe you are looking for

  • Why can't I use my Ipad on 2 different computers

    I have my Ipad on Itunes in my reg computer why will it not sync on my 2nd computer my laptop to travell with.

  • Import Oracle BPA model (EPC) to Oracle BPM 11G

    Hi, I have my business process modeled using Oracle BPA product (EPC format). Now I need to import this model into Oracle BPM 11G which uses BPMN 2.0 format. Does any of the softwares provide a way to transform EPC models to BPMN 2.0 format. These ar

  • Deployment of SAP mappings

    i have created numerous mapping in OWB to extract, transform and load data from SAP tables. this of course includes dimension and fact data. i understand that they are ABAP mappings so ABAP source code and an SQL Loader control file will be created f

  • Flash--Classroom in a book

    I'm trying to learn Flash by using the Adobe Flash "Classroom in a Book" and I'm stumped. The book is telling me to draw two overlapping rectangles for masking but every time that I do it doesn't come out right. If I use only one, things are fine, un

  • Saving Edited photos - Grey fractured picture icon

    After completing an edit on Elements 6 , and save it to the Browser, a 'Grey Fractured picture' Icon appears in the browser. It is then not possible to recover this edit but I have to return to the original photo. It appears at random, and I have tri