Problems with MSSQL TSQL Replace Function
Posted on 2009-12-20
I'm trying to correct some text in a number of records within a MSSQL2008 database, but the following code, although saying 1 row afftected (a test row), it has not changed the record - The row contains the word 'Lunge' in the sentence, so cannot understand why it does not change it to 'Lounge' any ideas?!
set Meta_Description = REPLACE(Meta_Description,'Lunge','Lounge'),
Meta_Keywords = REPLACE(Meta_Keywords,'Lunge','Lounge'),
Meta_Title = REPLACE(Meta_Title,'Gywnydd','Lunge','Lounge'),
Meta_URL = REPLACE(Meta_PageURLName,'Lunge','Lounge')
where Meta_AreaCode = 'CITY' and Meta_CatCode = 'CARPET'