I am unable to use sybase replace
function to replace data.
Basically what i need is to update all the occurrences of 'abc'
and change with 'zzz'
.]
table_clmn
is data type text
I am using the following sql --
update table
set table_clmn = replace(table_clmn , 'abc', 'zzz') WHere id in (1, 2)
I get the following error
Incorrect syntax near the keyword 'replace'.
Assuming you're using Sybase ASE, you need to use the built-in function 'str_replace()' instead of 'replace()'. The 'replace' function can only be used for changing the default constraint on a table column.