title: Concatenate multiple columns into one in hive
body: <p>I need to concatenate column values into a single column.
  I have column names in a variable as <code>colnames=col1,col2,col3</code> .
  I am writing the below query from a unix shell and calling the hive. But when I do this, I am getting only the column names concatenated not the values of those columns.</p>
  
  <pre><code>select concat('regexp_replace("${colnames}",",","^")) as result from table;
  </code></pre>
  
  <p>I would like the output as: </p>
  
  <blockquote>
    <p>ABCD^10^XYZ</p>
  </blockquote>
  
  <p>(<code>ABCD</code>,<code>10</code>,<code>XYZ</code> are the column values)</p>