Learn about replace and translate function in oracle, we have the largest and most updated replace and translate function in oracle information on alibabacloud.com
The Oracle translate function and replace function Usage Details, oracletranslate
Syntax of the translate function:
translate(expr, from_strimg, to_string)
Introduction:
Translate returns expr, where all occurrences of each character in from_string
Oracle uses the TRANSLATE function to replace one character in a string. How can I replace (12345, 1234, 56789) with '192*12345 '? First, replace: ChenZw> select replace ('(12345 )',',','*'),'(', ''''), ')', ''') from dual; REPLACE (RE --------------
One, replace functionThe function of the Replace function is to replace the specified string in the source target with the corresponding character, for example:(1) Replace the JI in the "Jisuanji" string with 1;sql> Select replace (' Jisuanji ', '
Today, I read an example in SQL cookbook. I saw two functions replace and translate have doubts. I feel that these two functions have the same role, the examples in the book are not very clear. After Google's reading the official Oracle explanation,
I. Syntax: TRANSLATE (string, from_str, to_str) II. Purpose return: replace each character in from_str (all appearing) with a string after the corresponding character in to_str. TRANSLATE Is a superset of the functions provided by REPLACE. If
1. TRANSLATE syntax: TRANSLATE (Char, from, tousage: Returns a string that replaces each character that appears in the From, with the corresponding character in to. If the from is longer than the to string, then the characters that are
--translate functionFunction Description:Translate (str, FROM_STR, TO_STR), replacing the from_str in str with TO_STR.Translate is a superset of the functionality provided by replace. From_str and To_str are the corresponding relationships from left
Translate is a function to replace a characterGrammar:Translate (char, FROM_STR,TO_STR)where char is the string to be processed.From_str is a set of character sets to be replaced in order, note that the character set is not a string.To_str is the
TRANSLATE is a superset of the functionality provided by REPLACE.
Syntax: TRANSLATE (STRING,FROM_STR,TO_STR) parameter
1:string, original string parameter
2:from_str, string parameter
3:to_str that needs to be replaced, used to replace
Oracle character replacement function translate usage Oracle provides a character replacement function translate. Unlike the replace function, the translate function replaces character rather than string. The syntax is as follows: TRANSLATE (expr,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.