sql - REPLACE query format in DB2 -
I have a set of Jason Forms stored in a column and now I need to change a particular word. How to use query instead of query Every time I use it, I get a token exception. Please advise.
Name Age data ABD 15 [["Name": "ABC", "Type": "Regular", "Mutt": 18 }
In the data column, I have to replace for "type", this student should be typed.
REPLACE (data, 'type' 'StudentType');
It was not working How to do it?
Many thanks in the very beginning
Just like @Mostasio, if you use In the selection statement, REPLACE
will return your data with 'Type'
instead of 'StudentType'
. This does not actually change the data in your database if you want to update your data, then you should update UPDATE
statement
MyTable SET MyColumn = REPLACE ( MyColumn, 'OldString', 'NewString') is required
Comments
Post a Comment