<?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: Selecting only numbers from a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537799#M1122936</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Joachim,&lt;/P&gt;&lt;P&gt;Either Keepchar or Purgechar can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keepchar( 'Field' ,'0123456789')&amp;nbsp; &lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Purgechar( 'Field', 'abcdefghijklmnopqrstuvwxyz')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Jan 2014 16:37:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-01-20T16:37:57Z</dc:date>
    <item>
      <title>Selecting only numbers from a field</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537796#M1122933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need a table in QV containing a students year. The information is available in the SQL DB, but only as a number in a field containing class information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Student_level&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;PersonID as %StudentID,&lt;/P&gt;&lt;P&gt;Year;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql SELECT&lt;/P&gt;&lt;P&gt;PersonID,&lt;/P&gt;&lt;P&gt;left(Class,1) as Year&lt;/P&gt;&lt;P&gt;FROM Class&lt;/P&gt;&lt;P&gt;Where (Title like '%A' or Title like '%B' or Title like '%C' or Title like '%D' or Title like '%E' or Title like '%F' or Title like '%G')&lt;/P&gt;&lt;P&gt;and CHAR_LENGTH(Title) &amp;lt;4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SQL table looks like this:&lt;/P&gt;&lt;P&gt;PersonID, Class&lt;/P&gt;&lt;P&gt;1, 2A&lt;/P&gt;&lt;P&gt;2, 2A&lt;/P&gt;&lt;P&gt;3, 10B&lt;/P&gt;&lt;P&gt;4, 1G&lt;/P&gt;&lt;P&gt;5, 6C&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the above statement will return "1" as Year for both PersonID 3 and 4. Is there a way to strip away the characters, leaving just the numbers behind? Either in the SQL-statement or in the QV loading script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm, as always, grateful for all help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 15:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537796#M1122933</guid>
      <dc:creator />
      <dc:date>2014-01-20T15:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting only numbers from a field</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537797#M1122934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, for instance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; KeepChar(Class,'0123456789')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:03:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537797#M1122934</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2014-01-20T16:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting only numbers from a field</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537798#M1122935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use Keepchar() function. try below mentioned syntex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex: Keepchar&lt;SPAN style="font-size: 8pt;"&gt;('12ab98q', '0123456789')&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537798#M1122935</guid>
      <dc:creator>giakoum</dc:creator>
      <dc:date>2014-01-20T16:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting only numbers from a field</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537799#M1122936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Joachim,&lt;/P&gt;&lt;P&gt;Either Keepchar or Purgechar can be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keepchar( 'Field' ,'0123456789')&amp;nbsp; &lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;Purgechar( 'Field', 'abcdefghijklmnopqrstuvwxyz')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;AJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:37:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537799#M1122936</guid>
      <dc:creator />
      <dc:date>2014-01-20T16:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting only numbers from a field</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537800#M1122937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course! Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jan 2014 16:41:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-only-numbers-from-a-field/m-p/537800#M1122937</guid>
      <dc:creator />
      <dc:date>2014-01-20T16:41:08Z</dc:date>
    </item>
  </channel>
</rss>

