About Translate function

When we are using translate () the each character of 2nd expression is replaced by specified position character from 3rd expression up to this is fine. But after getting the result set Can we interchanged the expression2 with expression 3 for again getting the Original Value ?

@Sven... Yes it is - or more accurately, can be - if you use a reversible mapping:
select translate('hello world!', 'abcde', 'edcba') from dual ;
-- hallo worlb!
select translate(
     translate('hello world!', 'abcde', 'edcba'),
     'edcba','abcde' ) from dual ;
-- hello world!-Sp

Similar Messages

  • HOW TO USE TRANSLATE FUNCTION

    Hi
    in XSQL i am one getting one row like this
    <REASON_FOR_REJECTION>1.Overhead line is not existing in front of the premises,2.The distance from the pole to the serice is more than 30 meters.,3.Another service is existing in the same premises with arrears.</REASON_FOR_REJECTION>
    In the above String for every comma i want to put <br>
    the output should come like this:
    1.Overhead line is not existing in front of the premises
    2.The distance from the pole to the serice is more than 30 meters.
    3.Another service is existing in the same premises with arrears
    i have used translate function like this <xsl:value-of select="translate($REASON_FOR_REJECTION,',',&lt;br>)'"/>
    but i couldnt get proper result;how can i do this ??? PLZZ HELP

    Hi Jayant,
    please have a look at the following link: http://help.sap.com/saphelp_nw04s/helpdata/en/ae/48e7428d877276e10000000a1550b0/frameset.htm
    Regards,
    Christophe

  • Using translate function to correct character set problem....

    I have a table(TBL_STOCK) on Oracle XE.
    Rows come from sql server 2005 with a trigger on sql server table via the linked server.
    But there is a character set problem with some character like İ,Ş,Ğ.
    They change to Ý,Þ,Ð. in Oracle.
    How can i correct these ? Do you suggest the TRANSLATE function ?
    What do u think, if i create an After Insert trigger on Oracle table(TBL_STOCK) and convert these character using the Translate function when they inserted from sql server.
    Anyone have any other ideas that can be more efficient. Any thoughts appreciated.
    Thanks in advance.
    Adam
    PS:The NLS_CHARACTERSET of Oracle is AL32UTF8.

    It is sql server 2005 and Collation is SQL_Latin1_General_CP1_CI_AS

  • Using Translate() function of XSLT ...

    Hi guys
    I have an xml document that i am converting into an html document using XSLT. I need to replace the XML new lines(&#10) with html new lines (<br>) while the xslt transform takes place on my xml document.
    For this I have found the translate function of XSLT but I need to use it on a specific tag and not all the tags in the xml document.
    <ExampleTag>
    1 first line
    2 second line
    3 third line
    </ExampleTag>
    translate(string, replaced_text, replacement_text)
    so I need to get my tags value in the variable string which is:
    1 first line
    2 second line
    3 third line
    and replaced_text: '&#10' and replacement_text: '<br>'
    but the problem is XSLT syntax is so bad that i just cant devote enough time to learn it. Any suggestions for the syntax guys?? an example would be extremely useful.
    cheers :)

    Hey
    after a bit of struggle came up with this:
    <xsl:template match="ExampleTag">
    <xsl:variable name="string" select="."> </xsl:variable>
    translate(string, "&#10", "</br>" )
    <xsl:value-of select="$string"/>
    </xsl:template>
    but its not working :(
    any suggestions??

  • Documentation about this function module

    ineed Documentation about this function module RP_ANSAL_FROM_PERNR

    Hi Avinash,
    Have a look at the function group program documentation.It gives an idea of what the function module does.
    Short text
    Annual Salary Functionality (ANSAL)
    Description
    This function group contains different functionality for calculating the annual salary, and calculating a period salary from the annual salary.
    The function group evaluates different tables and features:
    Tables
    T503      defines whether an employee is paid on an
              hourly basis or per period
    T510W     defines the time unit
    T511      determines the relevant module from the annual
              salary wage type, rounding, etc.
    T539J     defines the valid wage types for calculating 
              the annual salary
    Features
    ANSAL     defines the annual salary wage type
    PFREQ     number of periods per year
    Old U510F -> use T510F ?
    Thanks
    Lakshman

  • Problem with translate function (C++ parser v9)?

    When upgrading to v9 of the C++ parser, we notice a problem with the translate function within xsl stylesheets. Take the following snippet :-
    <StartDt><xsl:value-of select="translate(string(CheckInDate),'-','')"/></StartDt>
    Previously, this statement would strip the '-' chars from our input dates of the form 2002-05-02 to give 20020502. It now does not replace the '-' chars which causes our transformed output to be invalid. We have many developed and tested xsl's which now don't work.
    When we revert to v8, the same xsl's work correctly.
    This happens on all platforms (Windows/Linux/Solaris).
    Anyone else noticed this?
    Regards,
    Mike

    It worked for me as well.
    Use DUMP to find out the char code used for é and ú and try to replace these character codes.
    On my system it is 130 and 163
    SELECT TRANSLATE('héllú wúrld', 'éú', 'eu'),
           dump('héllú wúrld'),
           TRANSLATE('héllú wúrld', chr(130)||chr(163), 'eu')
    FROM   dual;
    hellu wurld
    Typ=96 Len=11: 104,130,108,108,163,32,119,163,114,108,100
    hellu wurld

  • Translate function

    hi,
         How to use Translate function in VC? Please tell me with one exmple.
          Points will be given to correct solution.
    Cheers,
    Jayant

    Hi Jayant,
    please have a look at the following link: http://help.sap.com/saphelp_nw04s/helpdata/en/ae/48e7428d877276e10000000a1550b0/frameset.htm
    Regards,
    Christophe

  • Using translate function for one to many character translation

    Hi friends!
    Can anybody tell me whether it is possible to use built in translate function for converting some text from a one alphabet to another one, if these alphabets are of different length. Something like
    SELECT TRANSLATE('текст',
    'АБВГДЕЕЖЗИКЛМНОПРСТУФХЦЧШЩЭЮЯ',
    'ABCGDEF"*GH*"HIJKLMNOPQRSTYVWXYZ') FROM dual;
    Or there is another function for this, or it is impossible?
    Thanks

    Hi,
    Maybe you could use REPLACE just once, and then TRANSLATE the rest?
    Something like:
    SELECT TRANSLATE(REPLACE('ABcDE', 'c', 'xz'),
                     'ABCDE',
                     'abcde')  from dual;
    TRANSLATE(REPLACE('ABCDE','C','XZ'),'ABCDE','ABCDE')
    abxzde                                             
    1 row selected.Regards
    Peter

  • NEED INFORMATION ABOUT "MAX_TEST" FUNCTION MODULE

    HI ABAPERS,
                      I need information about "MAX_TEST" function module . this function module is used in 4.6 version , now system have been shifted to 6.0.....here in 6.0 version this function module is not prasent.can any one tell me which new function module we can use in place of this function module, without changing the functionality........
             Thanks in advance
    regards,
    SUNIL

    The module is not very sophisticated. Profficiency in Java or ABAP will be a great bonus here. There are plenty of good materials regarding XI on SDN. I suggest to start with step-by-step guides and master all basic integration scenarios
    http://wiki.sdn.sap.com/wiki/display/XI/Step-by-Step+Guides
    Opportunities in industry are not bad also, cause PI is rather popular among customers. The best thing is that it fits any type of customer's business. Integration is demanded almost everywhere.

  • Encrypt/Decrypt using REPLACE/TRANSLATE function

    Hi,
    Can someone please provide me any procedure/function which encrypts/decrypts a string using REPLACE/TRANSLATE function?
    Thanks
    Dinakar

    example with TRANSLATE:
    CREATE OR REPLACE function temp_encrypt (p_value IN VARCHAR2)
    RETURN VARCHAR2 IS
    BEGIN
        RETURN(TRANSLATE(p_value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'BCDEFGHIJKLMNOPQRSTUVWXYZA'));
    END;
    CREATE OR REPLACE function temp_decrypt (p_value IN VARCHAR2)
    RETURN VARCHAR2 IS
    BEGIN
        RETURN(TRANSLATE(p_value, 'BCDEFGHIJKLMNOPQRSTUVWXYZA', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'));
    END;
    SQL> SELECT temp_decrypt('MY TEST') FROM dual;
    TEMP_DECRYPT('MYTEST')
    LX SDRS
    SQL> SELECT temp_encrypt('LX SDRS') FROM dual;
    TEMP_ENCRYPT('LXSDRS')
    MY TESTyou may combine this with REPLACE() ...

  • About CallByteMethodA Function

    Hi you all:
    I have some problem about CallByteMethodA function.
    This is what my java code looks like:
    public void setDS_INFO_mac(byte[] mac) {
    for( int i = 0; i < mac.length; ++i ) {
    this.ds_info.mac[i] = mac;
    This is what my c code looks like:
    jobject objref;
    jclass cls = NULL;
    jfieldID fid = NULL;
    jmethodID mid = NULL;
    jbyte dsMac[6];
    jbyteArray returnArray = 0;
    /* code not pertaining to this question snipped. */
    mid = env->GetMethodID(cls, "setDS_INFO_mac", "([B)V" );
      for( int j = 0; j < 6; ++j ) {
          dsMac[j] = search_Info[i].ds_info.mac[j];
    returnArray = env->NewByteArray(6);
    if( returnArray != NULL ) {
    env->SetByteArrayRegion(returnArray, 0, 6, (jbyte*)dsMac);
    env->CallByteMethodA(objref, mid, (jvalue*)returnArray);
    env->DeleteLocalRef(returnArray);
    This is not working.
    and, some about run time exception as follows:
    Exception in thread "main" java.lang.NullPointerException
    at CFGINFO.setDS_INFO_mac(DSCIStructure.java:97)
    at DSCIJNInterface.dsc_EnumSearch(Native Method)
    at MainApp.searching(MainApp.java:105)
    at MainApp.main(MainApp.java:46)
    Any idea what I'm doing wrong?

    You are missing error checking code. Many calls to the JNI interface require that you check the method return value. Many calls also require that java exceptions must be checked for after the call.

  • How to translate Function text matching to fucntion code?

    I try to translate Function text matching to Function code in GUI status?
    Is there any way you know how to solve it?

    Do you want to get Function code related to function Text in GUI Status programatically?

  • I had a translate function in my tool bar when I updated firefox it went awa

    had a translate function in the toolbar, when I updated firefox it went away and I cannot figure out how to get it back. Basically ifyou were on a e mail or website that was in a different language you just hit this and it translated it no highlighting no cut and paste HELP I am an american living in a foreign country and am desperate

    That was probably from the "Google Toolbar".
    :see https://support.mozilla.com/questions/837473
    You can avoid the overhead, care and feeding of extensions and other problems of extensions with a '''bookmarklet''' which has a '''keyword''' to invoke it directly from the Location Bar.
    '''Name:''' tr: translate from (fr, de, etc.)
    :'''Location:''' javascript:location='http://translate.google.com/translate?u='+encodeURIComponent(location);
    :'''Keyword:''' tr:
    :'''Description:''' Test page http://web.de/ and http://web.nl/

  • Translate() function in an xpath predicate

    I'm trying to use the translate() function in an xpath predicate, and it appears to be having no effect. For instance, I have the following XML document (abbreviated for clarity):
    <metadata>
    <baseObject>
    <PublicationTime>2003-06-30T21:45:56Z</PublicationTime>
    </baseObject>
    </metadata>
    The following xpath expression returns no nodes:
    metadata[translate(baseObject/PublicationTime, "-:TZ", "") = "20030630214556"]
    But this next expression does return a node:
    metadata[translate(baseObject/PublicationTime, "-:TZ", "") = "2003-06-30T21:45:56Z"]
    It appears to me that the translate function is not removing the -, :, T, and Z characters as would be expected. Am I misunderstanding the usage of the translate function, making an error in my xpath expression, or is there some other explanation?
    Thanks.
    Brian

    Brian
    This looks like a bug in the implementation of translate
    Filed as bug 3036042

  • Office 2010 build-in translate function not work

    Hi there,
    The Office 2010 translate function is not work on user's desktop, word/outlook/excel, none of them working. It was working before. at that time, I can simply select a word, right click and then select translate, from the right side pane, I can select from
    English to Chinese, and then give me the detail translation information of the word. But suddenly, this function was not working anymore and we did not change anything on MS Office. When I did the same steps, it shows no results were found.
    When I check the translation options, it shows English to Chinese is selected under available language pairs. The weird thing is, when I change the translation setting to from Dutch to Chinese, it translated to Chinese with the very simple result. so any idea
    to get it fixed?
    Regards,
    David

    Hi David,
    Please first make sure your Office 2010 is fully patched. In addition, we can try to run a repair of your Office installtion to check the result:
    http://office.microsoft.com/en-us/powerpoint-help/repair-office-programs-HA010357402.aspx
    Thanks,
    Steve Fan
    TechNet Community Support

Maybe you are looking for