title: SQL Select WHERE Column NOT LIKE across multiple lines
body: <p>I have got table that is looking like this: </p>
  
  <pre><code>+------+-------+-------------+
  ID_Loc  Type    Data
  +------+-------+-------------+
  ABC     RMKS    Hello
  ABC     NAM     Joe Smith
  ABD     NAM     Peter Hill
  ABD     RMKS    Bye Bye
  ABD     NAM     Freddy Tall
  ABE     NAM     Loran Bennett
  ABE     RMKS    Bye Bye
  ABF     NAM     Liv Claris
  ABF     RMKS    Bye Bye
  +------+-------+-------------+
  </code></pre>
  
  <p>And I need to select all ID_Loc WHERE DATA NOT LIKE 'Hello'. When I tried:</p>
  
  <pre><code>SELECT distinct ID_loc FROM data_full WHERE DATA NOT LIKE '% Hello' 
  </code></pre>
  
  <p>This also selects ID_Loc: 'ABC', which contains 'Hello' in Data.
  Also as this is going to affect quite a lot of or rows, would be nice if I can point query to only look at the rows were Type RMKS is used. </p>
  
  <p>I am using MS SQL Server 2008</p>
  
  <p>SQL fiddle address is: 
  <a href="http://sqlfiddle.com/#!6/38130/6" rel="nofollow">http://sqlfiddle.com/#!6/38130/6</a></p>
  
  <p>Any help would be really appreciated. </p>