Return to Snippet

Revision: 71308
at February 16, 2017 05:39 by bbrumm


Initial Code
--Example 1
SELECT 'Complete IT Professional' as SAMPLE_TEXT,
TRANSLATE('Complete IT Professional', 'o', 'X') as TRANSLATE_TEST
FROM dual;

--Example 2
SELECT 'Complete IT Professional' as SAMPLE_TEXT,
TRANSLATE('Complete IT Professional', 'Is', 'SW') as TRANSLATE_TEST
FROM dual;

--Example 3
SELECT 'Complete IT Professional' as SAMPLE_TEXT,
TRANSLATE('Complete IT Professional', 'IsC m', 'SWx2q') as TRANSLATE_TEST
FROM dual;

--Example 4
SELECT 'Complete IT Professional' as SAMPLE_TEXT,
TRANSLATE('Complete IT Professional', 'omsi', '12') as TRANSLATE_TEST
FROM dual;

--Example 5
SELECT 'Complete IT Professional' as SAMPLE_TEXT,
TRANSLATE('Complete IT Professional', 'omsi', '') as TRANSLATE_TEST
FROM dual;

--Example 6
SELECT 'Complete IT Professional' as SAMPLE_TEXT,
TRANSLATE('Complete IT Professional', 'x', 'a') as TRANSLATE_TEST
FROM dual;

--Example 7
SELECT 'Complete IT Professional' as SAMPLE_TEXT,
REPLACE('Complete IT Professional', 'let', 'sip') as REPLACE_TEST,
TRANSLATE('Complete IT Professional', 'let', 'sip') as TRANSLATE_TEST
FROM dual;

Initial URL
http://www.databasestar.com/oracle-translate/

Initial Description
A few examples of the TRANSLATE function.

Initial Title
Oracle TRANSLATE Function

Initial Tags
sql, Oracle

Initial Language
SQL