REPLACE command using passed variable values does not work

Hi SDN Community
Are you aware of the replace command not working when passing strings as opposed to a variable containing the string.
For example:
This works:
     replace '>JUL 2008</a>' with I_TEXT_VALUE into
                I_TEXT_VALUE_REPLACE.
This dosen't work:
     replace I_TEXT_VALUE_MATCH with I_TEXT_VALUE into
                 I_TEXT_VALUE_REPLACE.
where I_TEXT_VALUE_MATCH = '>JUL 2008</a>'
where I_TEXT_VALUE =  '>JUL 2008<BR>Actual</a>'
Thank you.
Simon

Hi SDN Community,
The following method was used to derive the same outcome required as per the REPLACE command.
      LEN_REPLACE = STRLEN( C_CELL_CONTENT ) - 12.
      I_TEXT_VALUE_REPLACE = C_CELL_CONTENT.
    replace I_TEXT_VALUE_MATCH with I_TEXT_VALUE into
                I_TEXT_VALUE_REPLACE.
      I_TEXT_VALUE_REPLACE = I_TEXT_VALUE_REPLACE+0(LEN_REPLACE).
      CONCATENATE I_TEXT_VALUE_REPLACE I_TEXT_VALUE INTO
                    I_TEXT_VALUE_REPLACE.
      C_CELL_CONTENT = I_TEXT_VALUE_REPLACE.
Thank you.
Simon

Similar Messages

  • Bind variable peeking does not work

    Oracle 9.2.0.8
    create table my_table (c number);
    create index i on my_table(c);
    declare
    par varchar2(10);
    begin
    par:='qqq';
    for rec in (select * from my_table t where c = par or par is null )loop null; end loop;
    --USES FULL TABLE SCAN, works SLOW!!!
    --but the same query with constat insted of bind variable :
    for rec in (select * from my_table t where c = par or 'qqq' is null )loop null; end loop;
    --USES INDEX i ON column c ,  works FAST!!!
    --WHY bind variable peeking does not work ???
    end;
    Thank you for reply

    sqlplus:
    drop table my_table;
    create table my_table as select object_name as c from all_objects where rownum<=1000;
    insert into my_table select * from my_table;
    insert into my_table select * from my_table;
    insert into my_table select * from my_table;
    insert into my_table select * from my_table;
    insert into my_table select * from my_table;
    insert into my_table select * from my_table;
    commit;
    select count(1) from my_table;
    COUNT(1)
    64000
    create index my_table_idx on my_table(c);
    exec dbms_stats.gather_table_stats('bogdanov','my_table',cascade=>true)
    variable par varchar2(10)
    exec :par := 'www'
    --FIRST CASE                                             
    explain plan for select * from my_table where c=:par or 'www'='qqq';
    @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 64 | 1792 | 3 |
    |* 1 | INDEX RANGE SCAN | MY_TABLE_IDX | 64 | 1792 | 3 |
    Predicate Information (identified by operation id):
    1 access("MY_TABLE"."C"=:Z)
    --SECOND CASE                                             
    explain plan for select * from my_table where c=:par or :par='qqq';
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 703 | 19684 | 95 |
    |* 1 | TABLE ACCESS FULL | MY_TABLE | 703 | 19684 | 95 |
    Predicate Information (identified by operation id):
    1 filter("MY_TABLE"."C"=:Z OR :Z='qqq')
    --THIRD CASE very strange....  COMPARE IT WITH FIRST CASE: 123456789 vs. 'qqq'    
    explain plan for select * from my_table where c=:par or 'www'=123456789;
    @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost |
    | 0 | SELECT STATEMENT | | 703 | 19684 | 95 |
    |* 1 | TABLE ACCESS FULL | MY_TABLE | 703 | 19684 | 95 |
    Predicate Information (identified by operation id):
    1 filter("MY_TABLE"."C"=:Z OR TO_NUMBER(:Z)=123456789)
    Edited by: user450084 on Dec 9, 2008 5:17 AM
    Edited by: user450084 on Dec 9, 2008 5:27 AM

  • Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work. Please help. Thanks.

    Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work. Please help. I am getting lots of spelling errors as the MacBook laptop screen is too small. Thank you so much! .

    Contentmom6 wrote:
    Brand new Mac user help please! How do you connect a 17" monitor to the MacBook? I have the monitor plugged into the Mac, but the F8 that I am used to with PC does not work.
    Normally, you just connect the monitor to the MacBook using a VGA adaptor that you can buy from an Apple Store.  Now try System Preferences > Displays > Detect Displays.  You should now be able to select a display mode for the monitor.  If it still doesn't work, then I'd check that everything is properly connected.  I've had problems with colours disappearing due to a faulty connection in the VGA adaptor.
    Bob

  • I am trying to trigger a custom event using a program but does not work ..

    HI ....i am trying to trigger a custom event of a custom object type using a program but does not work. If trigger the same event using SWUE it works.
    below is the code...
    {Key = '0010001115'. "Sales Order Number (hard-coded)
    CALL FUNCTION 'SWE_EVENT_CREATE'
      EXPORTING
        objtype                       = 'ZXXXXXXXF'
        objkey                        = KEY
        event                         = 'ZEVENT'
      CREATOR                       = ' '
      TAKE_WORKITEM_REQUESTER       = ' '
      START_WITH_DELAY              = ' '
      START_RECFB_SYNCHRON          = ' '
      NO_COMMIT_FOR_QUEUE           = ' '
      DEBUG_FLAG                    = ' '
      NO_LOGGING                    = ' '
      IDENT                         =
    IMPORTING
      EVENT_ID                      =
      RECEIVER_COUNT                =
    TABLES
      EVENT_CONTAINER               =
    EXCEPTIONS
      OBJTYPE_NOT_FOUND             = 1
      OTHERS                        = 2}
    Please guide me if i am missing something.

    Hi Sunny,
    I think you should try creating the event using FM SAP_WAPI_CREATE_EVENT.
    CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
      EXPORTING
        OBJECT_TYPE             =  'ZXXXXXXXF'
        OBJECT_KEY              = key
        EVENT                   = 'ZEVENT'
    *   COMMIT_WORK             = 'X'
    *   EVENT_LANGUAGE          = SY-LANGU
    *   LANGUAGE                = SY-LANGU
    *   USER                    = SY-UNAME
    *   IFS_XML_CONTAINER       =
    IMPORTING
       RETURN_CODE             = rcode
       EVENT_ID                = event_id
    * TABLES
    *   INPUT_CONTAINER         =
    *   MESSAGE_LINES           =
    *   MESSAGE_STRUCT          =
    Regards,
    Saumya

  • Recently purchased an unlocked iPhone4 handset only online. When my O2 sim card is used in handset it does not work. Any advice?

    Recently purchased an unlocked iPhone4 handset only online. When my O2 sim card is used in handset it does not work. Any advice?

    When you say it doesn't work, did it give you any type of message when you activated the phone with the O2 sim card?

  • Im tryting to install new itunes but says windows installer, you are tring to use is a network resource that is unavailable. find folder itunes.msi  i dont have a folder like that and anything i use that is related does not work. help me?

    "you are tring to use is a network resource that is unavailable. find folder itunes.msi" i dont have a folder like that and anything i use that is related does not work. ive tryed to uninstall but still does the same thing when.

    Should the advice above not fix things for you...
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • TS3276 when I use cable my mail does not work. with wireless ok

    when I use cable my mail does not work. with wireless ok

    Unpower and restart it.  If that doesn't help, try holding menu and left navigation keys TOGETHER for 6 secs.
    AC

  • Binary variable view does not work for long long int

    According to this document CVI 2013 supports long long int. While clang probably does, the variable view does not always support it... If you want to look at the value of a long long int variable and choose the binary format, the value may be too large to be displayed, see below: nothing is displayed if too many digits are required - actually 64 digits should be supported but aren't
    Solved!
    Go to Solution.

    Yep, looks like a bug: 423654.
    Support for long long's are not new to 2013, by the way. They've been supported since 2009, as long as you enabled the C99 extensions option.

  • Calling test sequence from CVI DLL that use ATL COM object does not work

    I am trying to call some DLL function writen in CVI from teststand. The CVI DLL is using ATL COM object(Written by me).
    The ATL COM object making instance of several ATL COM object inside it (including two controls that contains dialog). If I use a client writen in VC++ 6 and use the ATL COM (writen by me) works perfectly. But if I try to use it from CVI DLL it does not work any more.
    What is wrong? The client is passing an IUnknow interface to my component. Can anybody explain me what is wrong?

    It is not clear from your question as to what is specifically failing. If possible, one option would be to remove TestStand from the picture and see if the problem still occurs using a CVI EXE that invokes the CVI DLL.
    Scott Richardson - NI
    Scott Richardson
    National Instruments

  • Touch Panel Shared variable binding does not work.

    Hi,
    Is there any reason why shared variable binding is not working under Touch Panel Target?
    Is there any plan for implementing or there is some trick I should know?
    Andras

    RebeccaFo wrote:
    Hello Andras,
    which version of LabVIEW are you using? As yu can see in:
    http://digital.ni.com/public.nsf/websearch/04AAA6903A9456F08625715A0026BC57?OpenDocument
    it should work. So what for problems do you have?
    Thanks,
    Just FYI, the KnowledgeBase article linked above has been revised and moved to a new location.  See the new KnowledgeBase 58JFBGD2: Are Shared Variables Available For LabVIEW Mobile Module (Formerly PDA Modul...

  • Why my hp simple pass website login does not work with firefox latest version ?

    I have the latest version of firefox version 16.0.1 and my hp simple pass website login does not show up like it worked in IE9.

    I updated all the add ons already and I already reinstalled the HP simple pass after I installed firefox. I think that the new firefox is not yet compatible with the software (HP simple pass)

  • CODE ADDED using HTML Snippet Widget does not work

    I am trying to add some code to a web page using the HTML Snippet widget and it does not work on my page. the code is as follows:
    <script src='http://adn.ebay.com/files/js/min/ebay_activeContent-min.js'></script>
    <script src='http://adn.ebay.com/cb?programId=1&campId=5336536214&toolId=10026&keyword= coinset+nationaruba&catId=11116&width=728&height=90&font=1&textColor=333366&linkColor=333333&a rrowColor=8BBC01&color1=B5B5B5&color2=FFFFFF'></script>
    Can anyone help me to get this to work?
    Thanks!
    Gregg

    I got this code from Ebay. It is an Ebay partner link.
    Gregg

  • Personalising variable values does not have the effect

    Hello ,
    When the variable is personalised with a value and executed the query for the second time the variable does not have the personalised values again and it waits to enter the input!
    What is the reason behind this and are there any other settings to be done before personalising the variable value?
    Thanks in advance!
    Ram

    Hi BW,
        This is problem with one query or for all queries.
    you first have to activate the personalization in the BW backend system (via transaction RS_PERS_ACTIVATE or via Customizing path BW Customizing Implementation Guide -> Business Information Warehouse -> Reporting-Relevant Settings -> General Reporting Settings -> Activate Personalization in BEx
    And also check <a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1056690&nlang=EN&smpsrv=https%3a%2f%2fwebsmp110%2esap-ag%2ede">Note 1056690 - Query Designer: Variable personalization is deleted</a>
    Hope it Helps
    Srini

  • Need help getting rid of Trovi virus on Safari and Chrome. Cannot use the instructions Apple sent because the copy command under the edit tab does not work.

    I use OS X 10.9.5. I have a trovi virus on Safari and Chrome. Yesterday I thought I had gotten rid of Trovi, but it's back on both my search engines. The directions Apple sent yesterday do not work; the copy function under the edit tab is grayed out and non-responsive. Can anyone help me to get rid of this virus? Thanks.

    Are you referring to these instructions?
    Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support
    If so, be sure to read the instructions carefully, and note that you will need to repeat the numbered steps in the Conduit/Trovi/SearchProtect removal instructions for each line shown, not all together.
    If those instructions aren't working for you, for whatever reason, try my Adware Removal Guide. It provides similar instructions, worded differently, as well as an app (AdwareMedic) that can help you do the removal automatically.
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com, in the form of buttons allowing for donations. Donations are not required to use my site or software.)

  • Substitute Variables VI does not work for names with underbars. What can I do?

    For example, I want to change "p_0=p_1+p_2;" into "x0=x1+x2;". However the VI does not do it and returns just the same formula. Is this the specification? I enclosed a sample VI to show it.
    Attachments:
    SubTest.vi ‏44 KB

    You problem is in "Find String Identifier" (a subVI of "Substitue Variables") - it searches your variables and tries to split any other characters out of it (it only accepts alphanumeric and spaces as variable names, not special characters - hence your "p_0" becomes "p", and then "p" is not found in your substitution rules, so the original is piped through instead.
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.

Maybe you are looking for