title: Split a column based on the delimiter in hive editor
body: <p>How to write a query to split a string like <code>'india|koria'</code> based on <code>'|'</code> into <code>india</code> and <code>korea</code> </p>
  
  <p>I have tried this</p>
  
  <pre><code>select
      SUBSTRING('India|Korea', 1, position('|' in 'India|Korea') - 1) as first,
      SUBSTRING('India|Korea', position(',' in 'India|Korea') + 1)as second
  </code></pre>
  
  <p>but I get an error:</p>
  
  <blockquote>
    <p>error while compiling statement: failed: parseexceptio : cannot recognize input near 'in' '' India|Korea'' ')' in expression specification</p>
  </blockquote>
  
  <p>Any help from anyone? Thanks in advance.</p>
  
  <p>Note : I am running this query in hive editor. </p>