<?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 HOW TO: Remove leading zeros in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147594#M26014</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rakesh,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;its looks good what you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Mid(AUFNR, FindOneOf(AUFNR, '123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTyUuVvWwXxYyZz')) as Order_Key&lt;BR /&gt;[/n code]&lt;BR /&gt;yours seems to be a good one.&lt;BR /&gt;Thanks&lt;BR /&gt;Sravan&amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Feb 2011 11:26:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-10T11:26:50Z</dc:date>
    <item>
      <title>HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147591#M26011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found an interesting way to remove leading zeros from a field value. Thought I should share and see if you have a better way to achieve the same results.&lt;/P&gt;&lt;P&gt;Requirement was to remove leading zeros from field values of Material Numnber. This is a text field and can contain numeric or alpha-numeric values.&lt;/P&gt;&lt;P&gt;The trick I could do is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Material:&lt;BR /&gt;load *, replace(ltrim(replace(OldMaterial, '0', ' ')), ' ', 0) as NewMaterial;&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;OldMaterial&lt;BR /&gt;000001/230&lt;BR /&gt;0000012.34&lt;BR /&gt;0120-34.45&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;The result is:&lt;/P&gt;&lt;P&gt;&lt;!--StartFragment--&gt;&lt;/P&gt;&lt;TABLE bgcolor="white" border="1" bordercolor="white" cellpadding="0" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR align="right" bgcolor="#C1C1C1"&gt;&lt;TH&gt;OldMaterial&lt;/TH&gt;&lt;TH&gt;NewMaterial&lt;/TH&gt;&lt;/TR&gt;&lt;TR align="right" bgcolor="white"&gt;&lt;TD bgcolor="white"&gt;0120-34.45&lt;/TD&gt;&lt;TD bgcolor="white"&gt;120-34.45&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right" bgcolor="white"&gt;&lt;TD bgcolor="white"&gt;000001/230&lt;/TD&gt;&lt;TD bgcolor="white"&gt;1/230&lt;/TD&gt;&lt;/TR&gt;&lt;TR align="right" bgcolor="#EAEAEA"&gt;&lt;TD bgcolor="#EAEAEA"&gt;0000012.34&lt;/TD&gt;&lt;TD bgcolor="#EAEAEA"&gt;12.34&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Do you know a better way to perfor this conversion. Please remember, the field could contain a text value which may have leading zeros, which needs to be removed as well --&amp;gt; just num() doesn't work (even with isnum() function).&lt;/P&gt;&lt;P&gt;I got the results I was looking for but trying to find a better way. Otherwise, this post will serve others in future.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 11:51:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147591#M26011</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2009-06-24T11:51:25Z</dc:date>
    </item>
    <item>
      <title>HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147592#M26012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is certainly a missing functionality (or function) in QV. I could recommend QT to enhance LTRIM function to be capable of taking a character in the parameter and remove that leading character occurences. Same can go with RTRIM and even for TRIM as well.&lt;/P&gt;&lt;P&gt;Somehting like: LTRIM(Text, '0')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2009 22:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147592#M26012</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2009-06-24T22:01:34Z</dc:date>
    </item>
    <item>
      <title>HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147593#M26013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Rakesh.&lt;/P&gt;&lt;P&gt;thank you very much. You saved my lot of time. It was really helpful for me.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Muncho&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 11:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147593#M26013</guid>
      <dc:creator />
      <dc:date>2011-02-10T11:18:08Z</dc:date>
    </item>
    <item>
      <title>HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147594#M26014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi rakesh,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;its looks good what you do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;Mid(AUFNR, FindOneOf(AUFNR, '123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTyUuVvWwXxYyZz')) as Order_Key&lt;BR /&gt;[/n code]&lt;BR /&gt;yours seems to be a good one.&lt;BR /&gt;Thanks&lt;BR /&gt;Sravan&amp;lt;/body&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Feb 2011 11:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147594#M26014</guid>
      <dc:creator />
      <dc:date>2011-02-10T11:26:50Z</dc:date>
    </item>
    <item>
      <title>HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147595#M26015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rakesh,&lt;/P&gt;&lt;P&gt;How about this one:&lt;/P&gt;&lt;P&gt;evaluate(OldMaterial &amp;amp; '* 1')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 14:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147595#M26015</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-02-21T14:14:48Z</dc:date>
    </item>
    <item>
      <title>HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147596#M26016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, if your material is numeric. Try with Material 000000000012345ABC.&lt;/P&gt;&lt;P&gt;But I surely liked the trick. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Feb 2011 14:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147596#M26016</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2011-02-21T14:29:09Z</dc:date>
    </item>
    <item>
      <title>HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147597#M26017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style=": ; mso-bidi-font-size: 11.0pt; color: #000000; font-size: 9pt; Verdana&amp;amp;quot: ; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; ,&amp;amp;quot: ;"&gt;Hi Rakesh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; mso-bidi-font-size: 11.0pt; color: #000000; font-size: 9pt; Verdana&amp;amp;quot: ; sans-serif&amp;amp;quot: ; font-family: &amp;amp;quot; ,&amp;amp;quot: ;"&gt;Once again I have to thank you. I needed an answer to a seemingly simple question, remove leading zero’s. I found it here. Many thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; Regards Steve.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Aug 2011 06:56:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147597#M26017</guid>
      <dc:creator />
      <dc:date>2011-08-02T06:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: HOW TO: Remove leading zeros</title>
      <link>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147598#M26018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rakesh, seems to be an old question. Thanks for this post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Dec 2015 07:29:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/HOW-TO-Remove-leading-zeros/m-p/147598#M26018</guid>
      <dc:creator>berndjaegle</dc:creator>
      <dc:date>2015-12-18T07:29:43Z</dc:date>
    </item>
  </channel>
</rss>

