Developer forum

Forum » CMS - Standard features » MSSQL query - Why is this correct syntax not updating the table??

MSSQL query - Why is this correct syntax not updating the table??

Hans Ravnsfjall
Reply

Hi

I am trying to replace word smileys eomticons, with normal :) in the SQL firehose

When i run this query

Update News set NewsText=REPLACE(NewsText,'☺',':)')

I get this error message

http://screencast.com/t/I0G4udEKFAde

what is wrong here? And how do i fix my query so it works?

I am really hoping for your help, because I am totally stuck :/

 

 

 


Replies

 
Vladimir
Reply

Hi Hans,

you may use a cast function:

Update News set NewsText=REPLACE(CAST(NewsText as NVARCHAR(max)),'☺',':)') 

Best regards

 

You must be logged in to post in the forum