Querying in HIVE hadoop with \ (Back slash)
<p>I need to query on the column which is having values like this</p>

<p>Column name is locations:</p>

<pre><code>c:\users\abcd\hello
c:\users\xyabcddd\hello
c:\users\abcder\hello
</code></pre>

<p>I need to query the value 'abcd' exactly</p>

<pre><code>select * from table where locations like '%\abcd\'
select * from table where locations like '%\\abcd\\'
select * from table where locations like '%\\\\abcd\\\\'
</code></pre>

<p>Above all are not working. </p>

<p>If I query like below</p>

<pre><code>select * 
from table 
where locations like '%abcd%'
</code></pre>

<p>it will fetch all the results, not the exact one</p>

<pre><code>c:\users\abcd\hello
c:\users\xyabcddd\hello
c:\users\abcder\hello
</code></pre>

<p>but I need</p>

<p>Exactly this one 'c:\users\abcd\hello'</p>