title: Querying XML with Input Param
body: <p>Currently i am using this query to get results :</p>
  
  <pre><code>Select *
  From Staff 
  Where StaInsurance.exist('/COLInsuranceCompany/DOInsuranceCompany[Name/text()[. = "Apollo Life Assurance"]]') = 1  
  </code></pre>
  
  <p>How can i use a Input Parameter instead of hardcoded string in the query, below did not work :</p>
  
  <pre><code>declare @IInsurance nvarchar(200)
  set @IInsurance = 'Apollo Life Assurance'
  
  Select *
  From Staff 
  Where StaInsurance.exist('(/COLInsuranceCompany/DOInsuranceCompany/Name[id=(sql:variable("@IInsurance"))])[1]') = 1
  </code></pre>