Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with replace

Status
Not open for further replies.

mokesql

Programmer
Sep 6, 2001
30
0
0
AT
hey guys!
i want to use the replace funktion to replace something out of a string. in fact its the problem that i want to replace the substring '/SMS' by nothing. so i tryed replace(variable, '/SMS', '') and after that i tryed also replace(variable, '/SMS') but neighter worked. what could be the problem? thanx for the help

kemo
 

How about;

SELECT REPLACE('SAMPLE/SMS ONLY','/SMS',NULL)
FROM SYS.DUAL;

 
You may ommit the third parameter as it's null by default.
Your problem is possibly not in sql syntax but rather in using / as a special character in your calling environment (PRO*C?). Normally you have to use // or quote it in some way to cancel its special meaning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top