I used the string manipulator: PATINDEX
SELECT * from TempTable WHERE PATINDEX('%My Valentine%', convert(varchar(max),XML_Collection)) > 0
Important notes:
- be sure to convert the XML type to varchar(max) first before using any string manipulator functions
- if PatIndex == 0 then that string pattern does not exist
- if PatIndex > 0 then that string pattern exists
No comments:
Post a Comment