<?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>topic Re: Convert datatypes in Oracle Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346819#M414386</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide Real data, How data looks??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you expecting from below data. Because, I am assuming there are many possibilities with me. &lt;/P&gt;&lt;P&gt;000006621&lt;/P&gt;&lt;P&gt;8821&lt;/P&gt;&lt;P&gt;8956&lt;/P&gt;&lt;P&gt;000009764&lt;/P&gt;&lt;P&gt;0000A25R6&lt;/P&gt;&lt;P&gt;R738G&lt;/P&gt;&lt;P&gt;A23B5&lt;/P&gt;&lt;P&gt;00000TSK87&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;0000A250R6&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 May 2017 04:31:13 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-05-02T04:31:13Z</dc:date>
    <item>
      <title>Convert datatypes in Oracle Table</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346817#M414384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement to convert the datatype of a particular field to link properly. Table is from Oracle database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a values like, Integer, AlphaNumeric and Char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Int:&lt;/P&gt;&lt;P&gt;000006621&lt;/P&gt;&lt;P&gt;8821&lt;/P&gt;&lt;P&gt;8956&lt;/P&gt;&lt;P&gt;000009764&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having integer values like the above, i don't want the leading zeroes, i need only numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AlphaNumeric&lt;/P&gt;&lt;P&gt;0000A25R6&lt;/P&gt;&lt;P&gt;R738G&lt;/P&gt;&lt;P&gt;A23B5&lt;/P&gt;&lt;P&gt;00000TSK87&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this Alpha Numeric values, i dont need leading zeros,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which method I can use it to delete leading zeroes ? Please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why I am going to delete leading zeroes is, in Database it was not there, but in Qlikview it is showing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 01:56:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346817#M414384</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2017-05-02T01:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datatypes in Oracle Table</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346818#M414385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One method could be - &lt;/P&gt;&lt;P&gt;Load subfield(Value,'0',-1) inline [&lt;/P&gt;&lt;P&gt;Value&lt;/P&gt;&lt;P&gt;000006621&lt;/P&gt;&lt;P&gt;8821&lt;/P&gt;&lt;P&gt;8956&lt;/P&gt;&lt;P&gt;000009764&lt;/P&gt;&lt;P&gt;0000A25R6&lt;/P&gt;&lt;P&gt;R738G&lt;/P&gt;&lt;P&gt;A23B5&lt;/P&gt;&lt;P&gt;00000TSK87 ];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 02:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346818#M414385</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2017-05-02T02:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datatypes in Oracle Table</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346819#M414386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you provide Real data, How data looks??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What are you expecting from below data. Because, I am assuming there are many possibilities with me. &lt;/P&gt;&lt;P&gt;000006621&lt;/P&gt;&lt;P&gt;8821&lt;/P&gt;&lt;P&gt;8956&lt;/P&gt;&lt;P&gt;000009764&lt;/P&gt;&lt;P&gt;0000A25R6&lt;/P&gt;&lt;P&gt;R738G&lt;/P&gt;&lt;P&gt;A23B5&lt;/P&gt;&lt;P&gt;00000TSK87&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;0000A250R6&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 04:31:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346819#M414386</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-05-02T04:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datatypes in Oracle Table</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346820#M414387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kalyana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Trust that you are doing well!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can make use of below sample script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14937021083466078" jivemacro_uid="_14937021083466078"&gt;
&lt;P style="font-size: 13.3333px;"&gt;Data:&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LOAD Num(Int) AS Int,&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PurgeChar(Int, '0') AS NewInt,&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PurgeChar(AlphaNumeric, '0') AS AlphaNumeric;&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;Int, AlphaNumeric&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;000006621, 0000A25R6&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;88210, R738G0&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;89560, A23B50&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;000009764, 00000TSK87&lt;/P&gt;
&lt;P style="font-size: 13.3333px;"&gt;];&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will work absolutely fine for Numbers; whereas PurgeChar function will not work when there will be zero's in between of given field value. BTW, I am working on to get the 100% correct solution. Soon I will update you on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Rahul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 05:16:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346820#M414387</guid>
      <dc:creator>rahulpawarb</dc:creator>
      <dc:date>2017-05-02T05:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert datatypes in Oracle Table</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346821#M414388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Either do the cleaning in Oracle, or do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD *,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; If(IsNum(Field), Num(Field), Replace(Trim(Replace(Field, '0', ' ') &amp;amp; '|'), ' ', '0')) as ResultField&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL ....&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explanation:&lt;/P&gt;&lt;P&gt;Num() will strip the leading zeroes from the numreric values.&lt;/P&gt;&lt;P&gt;For the alpha values, replace the 0's with spaces, add a 'fence' to prevent removing trailing zeroes, trim, replace the spaces with zeroes again. This assumes that there are no spaces inthe source field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 May 2017 06:01:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-datatypes-in-Oracle-Table/m-p/1346821#M414388</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-05-02T06:01:10Z</dc:date>
    </item>
  </channel>
</rss>

