<?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: ZIP Code Formats Part 2 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ZIP-Code-Formats-Part-2/m-p/1643455#M732812</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Raw:&lt;BR /&gt;load&lt;BR /&gt;if(len(PostCode)&amp;lt;5,num(PostCode,'00000'),&lt;BR /&gt;if(len(PostCode)&amp;gt;5 and len(PostCode)&amp;lt;&amp;gt;8,left(PostCode,5),&lt;BR /&gt;if(len(PostCode)&amp;gt;5 and len(PostCode)=8,left(num(PostCode,'000000000'),5),&lt;BR /&gt;PostCode)))as PostCode&lt;BR /&gt;inline [&lt;BR /&gt;PostCode&lt;BR /&gt;123450000&lt;BR /&gt;34567&lt;BR /&gt;7751&lt;BR /&gt;77510000&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2019 00:09:45 GMT</pubDate>
    <dc:creator>Arthur_Fong</dc:creator>
    <dc:date>2019-11-06T00:09:45Z</dc:date>
    <item>
      <title>ZIP Code Formats Part 2</title>
      <link>https://community.qlik.com/t5/QlikView/ZIP-Code-Formats-Part-2/m-p/1643408#M732811</link>
      <description>&lt;P&gt;Hi all - I have found the following condition in my data.&amp;nbsp; the original function worked, but I found a situation where the Zip field had 8 digits, where there should have been 9, which means that the leading 0 has been dropped.&lt;/P&gt;&lt;P&gt;my Zip field is reading:&amp;nbsp; &amp;nbsp;77510000&lt;/P&gt;&lt;P&gt;I want to get, which is the proper zip code:&amp;nbsp; &amp;nbsp;07751&lt;/P&gt;&lt;P&gt;I've used this function in my LOAD statement.&amp;nbsp; My data loads from QVD's.&amp;nbsp; While the script runs all the way through the results in my field are either 0 or -1.&amp;nbsp; (There are additional conditions to deal with other formats in the data, the data was not very clean).&lt;/P&gt;&lt;P&gt;if(len(EMPE_ZIP_CD)&amp;lt;5,num(EMPE_ZIP_CD, '00000'),if(len(EMPE_ZIP_CD)&amp;gt;5,left(EMPE_ZIP_CD,5), EMPE_ZIP_CD)) or&lt;BR /&gt;if(len(EMPE_ZIP_CD)=8,left(num#(EMPE_ZIP_CD,'00000'),4), EMPE_ZIP_CD) as EE_Zip&lt;/P&gt;&lt;P&gt;Would really appreciate any additional help.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:45:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ZIP-Code-Formats-Part-2/m-p/1643408#M732811</guid>
      <dc:creator>gfisch13</dc:creator>
      <dc:date>2024-11-16T19:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: ZIP Code Formats Part 2</title>
      <link>https://community.qlik.com/t5/QlikView/ZIP-Code-Formats-Part-2/m-p/1643455#M732812</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;Raw:&lt;BR /&gt;load&lt;BR /&gt;if(len(PostCode)&amp;lt;5,num(PostCode,'00000'),&lt;BR /&gt;if(len(PostCode)&amp;gt;5 and len(PostCode)&amp;lt;&amp;gt;8,left(PostCode,5),&lt;BR /&gt;if(len(PostCode)&amp;gt;5 and len(PostCode)=8,left(num(PostCode,'000000000'),5),&lt;BR /&gt;PostCode)))as PostCode&lt;BR /&gt;inline [&lt;BR /&gt;PostCode&lt;BR /&gt;123450000&lt;BR /&gt;34567&lt;BR /&gt;7751&lt;BR /&gt;77510000&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 00:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ZIP-Code-Formats-Part-2/m-p/1643455#M732812</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2019-11-06T00:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: ZIP Code Formats Part 2</title>
      <link>https://community.qlik.com/t5/QlikView/ZIP-Code-Formats-Part-2/m-p/1643953#M732813</link>
      <description>&lt;P&gt;Thanks again Arthur - exactly what I was looking for.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 19:43:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ZIP-Code-Formats-Part-2/m-p/1643953#M732813</guid>
      <dc:creator>gfisch13</dc:creator>
      <dc:date>2019-11-06T19:43:11Z</dc:date>
    </item>
  </channel>
</rss>

