Stripping html when doing a like

I have a table with records of messages which contains html as part of the message. Is it possible to do a select * from Table where Message like '%blabla%' but ignoring any html in the Message field?


You might be able to convert the html to xml with something like:

CONVERT(xml, YourHTML, 2)

and then you might be able to use OPENXML to get the result.

If you want any more help provide consumable test data and expected results.

1 Like