<?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>&lt;DIV id="model-response-message-contentr_97e8246f949dd7da" class="markdown markdown-main-panel force-compact-layout enable-updated-hr-color" dir="ltr" aria-busy="false" aria-live="polite"&gt;
&lt;P data-path-to-node="0"&gt;How do I remove a currency symbol from a string and convert it into an int in Hive? For example, how do I change '124$' into 124?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 Jun 2026 06:39:18 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>2026-06-08T06:39:18Z</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>

