title: Find the exact occurrence of a substring in a string SQL SERVER 2008
body: <p>I want to know how we can find the exact occurence of a substring in a string. To be more specific the string has words seperated by commas and I want to know if a word exists exactly or not. </p>
  
  <p>Let's say we have something like this:</p>
  
  <pre><code>DECLARE @VisitedWebParts nvarchar(255)
  
   SET @VisitedWebParts =  'MyNavContacts,MyNavUpcomingMaturities,MyNavActivitySummary,MyNavCompanies,CompanyNavBidHistory,CompanyNav'
  </code></pre>
  
  <p>How do I find lets say if 'CompanyNav' existed in the string. Using Like or CharIndex may not help and correct me if I wrong because that would also falsely say CompanyNav would exist if CompanyNav did not actually exist and CompanyNavBidHis exists. You know what I mean!</p>
  
  <p>Thanks in advance for ideas and suggestions!</p>