Related Topics: | ||
Description: Replaces part of a text string with a different text string based on the number of characters you specify.
Syntax: REPLACE(Old_text, Start_num, Num_chars, New_text)
Old_text is text in which you want to replace some characters.
Start_num is the position of the character in Old_text that you want to replace with New_text.
Num_chars is the number of characters in Old_text that you want REPLACE to replace with New_text.
New_text is the text that will replace characters in Old_text.
Example:
REPLACE(abcdefghijk, 6, 5, "*") = abcde*k [replaces five characters, starting with the sixth character]
REPLACE(2010, 3, 2, "11") = 2011 [replaces the last two digits of 2010 with 11]
REPLACE(123456, 1, 3, "@") = @456 [replaces the first three characters with @]
© 1992-2013. ReliaSoft Corporation. ALL RIGHTS RESERVED.