title: How to extract part of a string in HIVE?
body: <p>I am looking to do this in Hive. The following is a query that works in sql server.</p>
  
  <pre><code>select LEFT('ENTERPRISE &gt; DEMO', CHARINDEX('&gt;', 'ENTERPRISE &gt; DEMO') - 2)
  </code></pre>
  
  <p>Basically I want to extract all characters in my string to the left of <code>&gt;</code>. Also, the number of characters that can appear before this <code>&gt;</code> sign is variable. 
  There is no <code>LEFT</code> function in hive. How can I use <code>substr</code> or <code>regexp_extract</code> for this?</p>