SQL Server String Functions
SQL Server string functions are scalar functions that perform an operation on a string input value and return a string or numeric value.
REPLACE function replaces some characters within a string with another set of characters. The syntax is:
REPLACE(string expression, value to be replaced, replacing value)
For example, the following query replaces each occurrence of the word "payable" with "receivable":
SELECT AccountDescription, REPLACE(AccountDescription, 'payable', 'receivable') AS DreamOn
FROM dimAccount WHERE AccountDescription LIKE '%payable%'
Tags: SQL Server String Functions SQL SQL Server Functions. Character String Data Types and Functions with Sample SQL Statements. Quick reference, Data Type Tables, Function Tables.
SQL Server string functions are scalar functions that perform an operation on a string input value and return a string or numeric value.
REPLACE Function
REPLACE function replaces some characters within a string with another set of characters. The syntax is:
REPLACE(string expression, value to be replaced, replacing value)
For example, the following query replaces each occurrence of the word "payable" with "receivable":
SELECT AccountDescription, REPLACE(AccountDescription, 'payable', 'receivable') AS DreamOn
FROM dimAccount WHERE AccountDescription LIKE '%payable%'