Sherzy
3/17/2016 - 4:56 PM

SQL Replace

SQL Replace

UPDATE [CRM_V4]. [dbo].[MCDesigns]
set htmlbody = REPLACE( htmlbody, '~AgentBranding~', '<table width="100%" style="border-collapse:collapse;" cellpadding="0" cellspacing="0" border="0"> ... </table>')
where BrokerID = 202 and Status = 'AC' and HtmlBody like '%~AgentBranding~%'

UPDATE [CRM]. [dbo].[MCDesigns]
set htmlbody = REPLACE( htmlbody, '© 2012 ', '© ~Date{Format: "yyyy"}~ ')
  where HtmlBody like '%© 2012%' and Status = 'ac' and BrokerID = 177

Commit


UPDATE [CTS].[dbo].[CompetitionEvent] SET
Name = REPLACE(Name, ' – ', ' - ')
WHERE Name like '% – %'