<?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 Re: How do I remove currency symbol from string  and convert into int  in hive? EXAMPLE (124$ INTO 124) in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-do-I-remove-currency-symbol-from-string-and-convert-into/m-p/240442#M202246</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/80182/chiranjeevivenkata51.html" nodeid="80182"&gt;@Venkat&lt;/A&gt;&lt;P&gt;Use regexp_replace function in hive to replace &lt;STRONG&gt;$ with '' then cast to int&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;select int(regexp_replace(string("124$"),'\\$',''));
+------+--+
| _c0  |
+------+--+
| 124  |
+------+--+
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;(or)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Starting from &lt;STRONG&gt;Hive-1.3 version&lt;/STRONG&gt; use replace function.&lt;/P&gt;&lt;PRE&gt;select int(replace(string("124$"),'$',''));
+------+--+
| _c0  |
+------+--+
| 124  |
+------+--+
&lt;/PRE&gt;</description>
    <pubDate>Thu, 17 Jan 2019 06:49:47 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-01-17T06:49:47Z</dc:date>
    <item>
      <title>How do I remove currency symbol from string  and convert into int  in hive? EXAMPLE (124$ INTO 124)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-I-remove-currency-symbol-from-string-and-convert-into/m-p/240441#M202245</link>
      <description />
      <pubDate>Thu, 17 Jan 2019 05:02:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-I-remove-currency-symbol-from-string-and-convert-into/m-p/240441#M202245</guid>
      <dc:creator>chiranjeevivenk</dc:creator>
      <dc:date>2019-01-17T05:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove currency symbol from string  and convert into int  in hive? EXAMPLE (124$ INTO 124)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-I-remove-currency-symbol-from-string-and-convert-into/m-p/240442#M202246</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/80182/chiranjeevivenkata51.html" nodeid="80182"&gt;@Venkat&lt;/A&gt;&lt;P&gt;Use regexp_replace function in hive to replace &lt;STRONG&gt;$ with '' then cast to int&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;select int(regexp_replace(string("124$"),'\\$',''));
+------+--+
| _c0  |
+------+--+
| 124  |
+------+--+
&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;(or)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Starting from &lt;STRONG&gt;Hive-1.3 version&lt;/STRONG&gt; use replace function.&lt;/P&gt;&lt;PRE&gt;select int(replace(string("124$"),'$',''));
+------+--+
| _c0  |
+------+--+
| 124  |
+------+--+
&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Jan 2019 06:49:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-I-remove-currency-symbol-from-string-and-convert-into/m-p/240442#M202246</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-01-17T06:49:47Z</dc:date>
    </item>
  </channel>
</rss>

