Oracle Column Value Modification
I am trying to fix an issue where some of the items in my table Documents Have a typo in one of the col开发者_高级运维umns
Where it should read Important: Please Read it instead reads ImportantPlease Read
I'm using not to good with Oracle, but how would I essentially do this
Update Documents Set Overview = "Imporantant: Please Read " +
Overview.SubStr(19, Overview.Length) Where Overview Like 'ImportantPlease Read%'
Now I know this is nowhere near Oracle Syntax but I was wondering if you could help me fill in the gaps
Thanks in advance, and please let me know if you need further explanation.
You probably want
UPDATE documents
SET overview = 'Important: Please Read ' || substr( overview, 19 )
WHERE overview LIKE 'ImportantPlease Read%'
Try this:
UPDATE Documents
SET Overview = REPLACE(Overview, 'ImportantPlease', 'Important: Please')
WHERE Overview LIKE 'ImportantPlease%';
精彩评论