<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Find a word or a group of words from a column in Hortonworks and creating it as a separate column in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Find-a-word-or-a-group-of-words-from-a-column-in-Hortonworks/m-p/214974#M176886</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to create a view in Hortonworks that I have in postgres greenplum where I am trying to find a word/words that exists in a column that has lot of words. If the word exists, the new column should show the word and if there are multiple words, the multiple words should be reflected with a space in between. Below is a running code in postgres Greenplum. Can anyone help me with the code in Hive?&lt;/P&gt;&lt;P&gt;CREATE OR REPLACE VIEW XYZ_V AS(
Select col1, col2, col3, col4,trim(both ' ' from &lt;/P&gt;&lt;P&gt;case when substring( lower(col4) from 'abcd'  )  is null then '' else substring( lower(col4) from 'abcd') end ||' '|| &lt;/P&gt;&lt;P&gt;case when substring( lower(col4) from 'pqrs'  )  is null then '' else substring( lower(col4) from 'pqrs') end ||' '|| &lt;/P&gt;&lt;P&gt;case when substring( lower(col4) from 'mnop'  )  is null then '' else substring( lower(col4) from 'mnop')  end) as col5 &lt;/P&gt;&lt;P&gt;FROM XYZ);&lt;/P&gt;&lt;P&gt;Thanks a lot in advance&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2018 21:04:33 GMT</pubDate>
    <dc:creator>souveekray</dc:creator>
    <dc:date>2018-06-04T21:04:33Z</dc:date>
  </channel>
</rss>

