Hi all,
I am trying to return the specific block of XML where the @SearchTerm phrase was found. I was trying to use the query() and contains() methods to get the specific block where the phrase was found.
here my query.
DECLARE @SearchTerm varchar(3000) = 'Availability through Health Insurance Exchange'
DECLARE @SearchTerm2 varchar(3000) = '"Availability through Health Insurance Exchange"'
SELECT
BillText.query('contains(.,sql:variable("@SearchTerm"))')
,*
FROM
Legislative.BillText bt
INNER JOIN CONTAINSTABLE (Legislative.BillText,BillText,@SearchTerm2) as k
ON k.[Key] = bt.BillTextID
What am I missing?
Thanks
Brian W