I have a field urn_sem.studentid that I’d like to replace a few characters in; for example:
ABC/2011/BCOMH_NC/I/12→ABC/2011/BCOMH/I/12ABC/2011/BCOMH_NC/I/24→ABC/2011/BCOMH/I/24
I’ve tried this query:
SELECT REPLACE(studentid, 'KNC/2011/BCOMH_NC/', ' KNC/2011/BCOMH/')
FROM urn_sem
but it doesn’t show the new value.
Do you want this:
The
WHEREclause is optional. It ensures that the replace is only on rows that change.