Problems with MSSQL TSQL Replace Function

Hi All,

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?!

Update web_metadata
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'


Regards

JamWales
JamieAsked:
Who is Participating?
 
Reza RadConsultant, TrainerCommented:
Glad to solve
Regards,
0
 
tigin44Commented:
did you check the trigger defined on the table. Probably s trigger preventing the update peration
0
 
Reza RadConsultant, TrainerCommented:
what is your sample row data? could you paste it here?
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
JamieAuthor Commented:
Hi tigin44.
There doesn't appear to be any triggers defined on that table - plus I've updated the same rows using an asp script without problems.
Regards
JamWales
0
 
JamieAuthor Commented:
Hi reza_rad/tigin44,
Many thanks for your help - having been asked for a sample row I looked at the data again - and saw I had a spelling errror  which stopped the replace from working. Sorry I should have double checked this first. I feel a bit of a fool now!
Regards
JamWales
0
 
JamieAuthor Commented:
Pointed me in the right direction.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.