<?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 Sorting column in ASCII mode in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213006#M66826</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with sort order in QlikView. I import data from an iSerie with ODBC and i have a lot of field containing Alphanumeric value . (mixed of Numbers and letters. ex : 145ABC14). When i create a table with this fields and click on the title to sort the column (The column are not sorted in ascii order but in a special QlikView order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1874_sourceID:1874" /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a big problem for me because when i compare a list of value with my system information. Fields are not in the same place in the list.&lt;/P&gt;&lt;P&gt;It seems that there are no way to sort all the column in ascii mode. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;Is there somebody who have solved this problem ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the explanation of QlikView :&lt;/P&gt;&lt;P&gt;Sorting in QlikView is done character by character (left to right) according to national collation. This is not strictly the same as in Microsoft products where sorting is performed by string.&lt;BR /&gt;&lt;BR /&gt;This means that only alphanumeric characters are of interest in regards of sort-order. All non-alphanumeric characters are treated the same, on the same level. For example:&lt;BR /&gt;&lt;BR /&gt;"A-B" will be sorted before "A BA" because "-" and " " will be treated equally and more characters are required to separate the strings.&lt;BR /&gt;&lt;BR /&gt;If the string contains numeric values, QlikView will first try to sort the numeric part of the string, before applying alphanumeric sorting. This will explain why 1ABAC2244 will be sorted before 002500A76 in the following example. The numeric part of 002500A76 will be 002500 (or 2500) which will be compared with 1 (numeric part of 1ABAC2244).&lt;BR /&gt;All identical numeric values receive the same symbol regardless of their presentation - i.e. 0025, 025, 25 etc. are considered identical and the symbol used to represent these is simply the one that appears first in the array ("0025" in this case) and this implies that these values are grouped together, sharing a common underlying symbol…&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is a somewhat simple sorting strategy, but with great advantage in performance compared to Microsofts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jul 2010 12:30:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-07-02T12:30:07Z</dc:date>
    <item>
      <title>Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213006#M66826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with sort order in QlikView. I import data from an iSerie with ODBC and i have a lot of field containing Alphanumeric value . (mixed of Numbers and letters. ex : 145ABC14). When i create a table with this fields and click on the title to sort the column (The column are not sorted in ascii order but in a special QlikView order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1874_sourceID:1874" /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a big problem for me because when i compare a list of value with my system information. Fields are not in the same place in the list.&lt;/P&gt;&lt;P&gt;It seems that there are no way to sort all the column in ascii mode. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;BR /&gt;Is there somebody who have solved this problem ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the explanation of QlikView :&lt;/P&gt;&lt;P&gt;Sorting in QlikView is done character by character (left to right) according to national collation. This is not strictly the same as in Microsoft products where sorting is performed by string.&lt;BR /&gt;&lt;BR /&gt;This means that only alphanumeric characters are of interest in regards of sort-order. All non-alphanumeric characters are treated the same, on the same level. For example:&lt;BR /&gt;&lt;BR /&gt;"A-B" will be sorted before "A BA" because "-" and " " will be treated equally and more characters are required to separate the strings.&lt;BR /&gt;&lt;BR /&gt;If the string contains numeric values, QlikView will first try to sort the numeric part of the string, before applying alphanumeric sorting. This will explain why 1ABAC2244 will be sorted before 002500A76 in the following example. The numeric part of 002500A76 will be 002500 (or 2500) which will be compared with 1 (numeric part of 1ABAC2244).&lt;BR /&gt;All identical numeric values receive the same symbol regardless of their presentation - i.e. 0025, 025, 25 etc. are considered identical and the symbol used to represent these is simply the one that appears first in the array ("0025" in this case) and this implies that these values are grouped together, sharing a common underlying symbol…&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is a somewhat simple sorting strategy, but with great advantage in performance compared to Microsofts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 12:30:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213006#M66826</guid>
      <dc:creator />
      <dc:date>2010-07-02T12:30:07Z</dc:date>
    </item>
    <item>
      <title>Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213007#M66827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can load data in appropriate order by using ORDER BY in your ODBC SQL sentence. After that you can sort data by "Load Order" in QV.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 13:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213007#M66827</guid>
      <dc:creator />
      <dc:date>2010-07-02T13:31:20Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213008#M66828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know this solution but it works for only one field (The first in order by). As you can see in my exemple i have 2 fields or more to sort in ascii mode. So this solution don't solve the problem completly. I want all fields to be sorted in ascii.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 13:48:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213008#M66828</guid>
      <dc:creator />
      <dc:date>2010-07-02T13:48:03Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213009#M66829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, this is a BAD solution, but if nobody comes up with something better...&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[TEST1 Sort Order]:&lt;BR /&gt;LOAD TEST1&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT DISTINCT TEST1&lt;BR /&gt;FROM...&lt;BR /&gt;ORDER BY TEST1&lt;BR /&gt;;&lt;BR /&gt;[TEST2 Sort Order]:&lt;BR /&gt;LOAD TEST2&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT DISTINCT TEST2&lt;BR /&gt;FROM...&lt;BR /&gt;ORDER BY TEST2&lt;BR /&gt;;&lt;BR /&gt;[Real Table]:&lt;BR /&gt;LOAD ...&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT ...&lt;BR /&gt;FROM ...&lt;BR /&gt;;&lt;BR /&gt;DROP TABLES&lt;BR /&gt; [TEST1 Sort Order]&lt;BR /&gt;,[TEST2 Sort Order]&lt;BR /&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jul 2010 23:24:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213009#M66829</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-02T23:24:21Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213010#M66830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi john,&lt;/P&gt;&lt;P&gt;Thanks for your response. Effectively i don' t have any other suggestion, so il will test it asap.&lt;/P&gt;&lt;P&gt;Do you have the problem too ? I don't anderstand why QlikView don't solve this ? (Just a little chekbox to sort in ascii mode for each field)&lt;/P&gt;&lt;P&gt;Seems to be alone, to want to sort field in ascii mode like other system information !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for sharing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Jul 2010 13:13:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213010#M66830</guid>
      <dc:creator />
      <dc:date>2010-07-03T13:13:37Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213011#M66831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;Thanks for the workaround. It works except that letters are before numbers (But it'is like Excel, so ...)&lt;/P&gt;&lt;P&gt;I test a second part (Store the final table in a QVD) but the ASCII sort is lost. (so I have to reload the field sort just before the QVD load)&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/5428.QV2.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/5428.QV2.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/7587.qv3.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/7587.qv3.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the final script :&lt;BR /&gt;&lt;BR /&gt;// Part 1 - ASCII SORT =&amp;gt; Ok&lt;BR /&gt;[Test1 Sort Order]:&lt;BR /&gt;LOAD&lt;BR /&gt; Text(TEST1) as TEST1;&lt;BR /&gt;SQL SELECT DISTINCT TEST1&lt;BR /&gt;FROM QVTEST ORDER BY TEST1;&lt;BR /&gt;&lt;BR /&gt;[Test2 Sort Order]:&lt;BR /&gt;LOAD&lt;BR /&gt; Text(TEST2) as TEST2;&lt;BR /&gt;SQL SELECT DISTINCT TEST2&lt;BR /&gt;FROM QVTEST ORDER BY TEST2;&lt;BR /&gt;&lt;BR /&gt;[Final Table]:&lt;BR /&gt;LOAD&lt;BR /&gt; Text(TEST1) as TEST1,&lt;BR /&gt; Text(TEST2) as TEST2,&lt;BR /&gt; Text(TEST3) as TEST3;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; TEST1,&lt;BR /&gt; TEST2,&lt;BR /&gt; TEST3&lt;BR /&gt;FROM QVTEST;&lt;BR /&gt;&lt;BR /&gt;DROP TABLE [Test1 Sort Order];&lt;BR /&gt;DROP TABLE [Test2 Sort Order];&lt;BR /&gt;&lt;BR /&gt;exit script;&lt;BR /&gt;&lt;BR /&gt;// Part2 - ASCII SORT with STORE =&amp;gt; ASCII Sort is lost&lt;BR /&gt;STORE [Final Table] INTO PB_TRI5.qvd;&lt;BR /&gt;DROP TABLE [Final Table];&lt;BR /&gt;&lt;BR /&gt;[Final Table QVD]:&lt;BR /&gt;LOAD&lt;BR /&gt; TEST1,&lt;BR /&gt; TEST2&lt;BR /&gt;FROM PB_TRI5.qvd (qvd)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Nobody see an inconvenience, that QlikView don't sort column in ASCII Mode ?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jul 2010 08:18:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213011#M66831</guid>
      <dc:creator />
      <dc:date>2010-07-05T08:18:38Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213012#M66832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To preserve the sort order when storing in a QVD, you could use the dual() function, and then sort in numeric order. I think like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Final Table]:&lt;BR /&gt;LOAD&lt;BR /&gt; Text(TEST1) as TEMP1,&lt;BR /&gt; Text(TEST2) as TEMP2,&lt;BR /&gt; Text(TEST3) as TEST3;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; TEST1,&lt;BR /&gt; TEST2,&lt;BR /&gt; TEST3&lt;BR /&gt;FROM QVTEST;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LEFT JOIN ([Final Table])&lt;BR /&gt;LOAD&lt;BR /&gt; Text(TEST1) as TEMP1,&lt;BR /&gt; dual(Text(TEST1),recno()) as TEST1;&lt;BR /&gt;SQL SELECT DISTINCT TEST1&lt;BR /&gt;FROM QVTEST ORDER BY TEST1;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LEFT JOIN ([Final Table])&lt;BR /&gt;LOAD&lt;BR /&gt; Text(TEST2) as TEMP2,&lt;BR /&gt; dual(Text(TEST2),recno()) as TEST2;&lt;BR /&gt;SQL SELECT DISTINCT TEST2&lt;BR /&gt;FROM QVTEST ORDER BY TEST2;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;DROP FIELDS&lt;BR /&gt; TEMP1,&lt;BR /&gt; TEMP2;&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;STORE [Final Table] INTO PB_TRI5.qvd;&lt;BR /&gt;DROP TABLE [Final Table];&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Final Table QVD]:&lt;BR /&gt;LOAD&lt;BR /&gt; TEST1,&lt;BR /&gt; TEST2&lt;BR /&gt;FROM PB_TRI5.qvd (qvd);&lt;/P&gt;&lt;P&gt;And yeah, I've never had a need to do an ASCII sort specifically, though it is surprising that it isn't supported. There might well be an easy solution, and I just don't know it because I've never needed it. Perhaps something to do with code pages? I'm not sure.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Jul 2010 17:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213012#M66832</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-06T17:49:28Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213013#M66833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's another workaround that doesn't require any script work. I got your sample charts to sort correctly by selecting Sort by Text and Sort by Expression:&lt;/P&gt;&lt;P&gt;=ord(TEST1) &amp;amp; ord(mid(TEST1,2)) &amp;amp; ord(mid(TEST1,3))&lt;/P&gt;&lt;P&gt;I actually only needed to use the first two chars to get your sample to sort the way you wanted. How many chars you have to sample is dependent on your data pattern. i don't know how practical or performant this would be with your real data.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 00:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213013#M66833</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-07-07T00:09:03Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213014#M66834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, good thinking. And if it doesn't perform well enough to be used in a chart, I suspect it would perform well enough to be used during the script. Maybe something like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[Final Table]:&lt;BR /&gt;LOAD&lt;BR /&gt; dual(TEMP1,((...&lt;BR /&gt; ord(mid(TEMP1,1) *256&lt;BR /&gt; + ord(mid(TEMP1,2))*256&lt;BR /&gt; + ord(mid(TEMP1,3))*256&lt;BR /&gt; ...) as TEST1&lt;BR /&gt;,dual(TEMP2,((...&lt;BR /&gt; ord(mid(TEMP2,1) *256&lt;BR /&gt; + ord(mid(TEMP2,2))*256&lt;BR /&gt; + ord(mid(TEMP2,3))*256&lt;BR /&gt; ...) as TEST2&lt;BR /&gt;,TEST3&lt;BR /&gt;LOAD&lt;BR /&gt; Text(TEST1) as TEMP1,&lt;BR /&gt; Text(TEST2) as TEMP2,&lt;BR /&gt; Text(TEST3) as TEST3;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; TEST1,&lt;BR /&gt; TEST2,&lt;BR /&gt; TEST3&lt;BR /&gt;FROM QVTEST;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 00:24:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213014#M66834</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-07T00:24:22Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213015#M66835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the final script. It's a little complicated but it seems to work in my QVD. (My fields is 13 caracters long)&lt;/P&gt;&lt;P&gt;Thanks you very much Rob and John. I learn a lot reading your post.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4540.qv.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/4540.qv.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Final Table]:&lt;BR /&gt;LOAD&lt;BR /&gt; dual(TEMP1,&lt;BR /&gt; ord(mid(TEMP1,1)) * 1000000000000 +&lt;BR /&gt; ord(mid(TEMP1,2)) * 100000000000 +&lt;BR /&gt; ord(mid(TEMP1,3)) * 10000000000 +&lt;BR /&gt; ord(mid(TEMP1,4)) * 1000000000 +&lt;BR /&gt; ord(mid(TEMP1,5)) * 100000000 +&lt;BR /&gt; ord(mid(TEMP1,6)) * 10000000 +&lt;BR /&gt; ord(mid(TEMP1,7)) * 1000000 +&lt;BR /&gt; ord(mid(TEMP1,8)) * 100000 +&lt;BR /&gt; ord(mid(TEMP1,9)) * 10000 +&lt;BR /&gt; ord(mid(TEMP1,10))* 1000 +&lt;BR /&gt; ord(mid(TEMP1,11))* 100 +&lt;BR /&gt; ord(mid(TEMP1,12))* 10 +&lt;BR /&gt; ord(mid(TEMP1,13))* 1) as TEST1,&lt;BR /&gt;&lt;BR /&gt; dual(TEMP2,&lt;BR /&gt; ord(mid(TEMP2,1)) * 1000000000000 +&lt;BR /&gt; ord(mid(TEMP2,2)) * 100000000000 +&lt;BR /&gt; ord(mid(TEMP2,3)) * 10000000000 +&lt;BR /&gt; ord(mid(TEMP2,4)) * 1000000000 +&lt;BR /&gt; ord(mid(TEMP2,5)) * 100000000 +&lt;BR /&gt; ord(mid(TEMP2,6)) * 10000000 +&lt;BR /&gt; ord(mid(TEMP2,7)) * 1000000 +&lt;BR /&gt; ord(mid(TEMP2,8)) * 100000 +&lt;BR /&gt; ord(mid(TEMP2,9)) * 10000 +&lt;BR /&gt; ord(mid(TEMP2,10))* 1000 +&lt;BR /&gt; ord(mid(TEMP2,11))* 100 +&lt;BR /&gt; ord(mid(TEMP2,12))* 10 +&lt;BR /&gt; ord(mid(TEMP2,13))* 1) as TEST2,&lt;BR /&gt; *;&lt;BR /&gt;LOAD&lt;BR /&gt; text(TEST1) as TEMP1,&lt;BR /&gt; text(TEST2) as TEMP2,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; text(TEST3) as TEST3;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; TEST1,&lt;BR /&gt; TEST2,&lt;BR /&gt; TEST3&lt;BR /&gt;FROM QVTEST;&lt;BR /&gt;&lt;BR /&gt;DROP FIELDS TEMP1,TEMP2;&lt;BR /&gt;&lt;BR /&gt;STORE [Final Table] INTO PB_TRI7.qvd;&lt;BR /&gt;DROP TABLE [Final Table];&lt;BR /&gt;&lt;BR /&gt;[Final Table QVD]:&lt;BR /&gt;LOAD * FROM PB_TRI7.qvd (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 09:23:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213015#M66835</guid>
      <dc:creator />
      <dc:date>2010-07-07T09:23:26Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213016#M66836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well this don't work on my reel data. ;-(&lt;/P&gt;&lt;P&gt;I think it is my conversion formula. I don't remenber how to convert a chain in decimal caracter by caracter&lt;/P&gt;&lt;P&gt;ord(mid(TEMP1,1)) * 1000000000000 +&lt;BR /&gt; ord(mid(TEMP1,2)) * 100000000000 +&lt;BR /&gt; ord(mid(TEMP1,3)) * 10000000000 +&lt;BR /&gt; ord(mid(TEMP1,4)) * 1000000000 +&lt;BR /&gt; ord(mid(TEMP1,5)) * 100000000 +&lt;BR /&gt; ord(mid(TEMP1,6)) * 10000000 +&lt;BR /&gt; ord(mid(TEMP1,7)) * 1000000 +&lt;BR /&gt; ord(mid(TEMP1,8)) * 100000 +&lt;BR /&gt; ord(mid(TEMP1,9)) * 10000 +&lt;BR /&gt; ord(mid(TEMP1,10))* 1000 +&lt;BR /&gt; ord(mid(TEMP1,11))* 100 +&lt;BR /&gt; ord(mid(TEMP1,12))* 10 +&lt;BR /&gt; ord(mid(TEMP1,13))* 1) as TEST1,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 13:51:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213016#M66836</guid>
      <dc:creator />
      <dc:date>2010-07-07T13:51:44Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213017#M66837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works just fine:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 14:28:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213017#M66837</guid>
      <dc:creator />
      <dc:date>2010-07-07T14:28:48Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213018#M66838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my exemple yes, but with a large panel of code (Near 90000) this don't work. [:'(]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 15:35:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213018#M66838</guid>
      <dc:creator />
      <dc:date>2010-07-07T15:35:44Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213019#M66839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try this one but i don't have enough precision in Qlikview. The result is to big. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am going to test John solution with join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dual(Text(NICART),&lt;BR /&gt; ord(mid(NICART,1)) * pow(256,12) +&lt;BR /&gt; ord(mid(NICART,2)) * pow(256,11) +&lt;BR /&gt; ord(mid(NICART,3)) * pow(256,10) +&lt;BR /&gt; ord(mid(NICART,4)) * pow(256,9) +&lt;BR /&gt; ord(mid(NICART,5)) * pow(256,8) +&lt;BR /&gt; ord(mid(NICART,6)) * pow(256,7) +&lt;BR /&gt; ord(mid(NICART,7)) * pow(256,6) +&lt;BR /&gt; ord(mid(NICART,8)) * pow(256,5) +&lt;BR /&gt; ord(mid(NICART,9)) * pow(256,4) +&lt;BR /&gt; ord(mid(NICART,10)) * pow(256,3) +&lt;BR /&gt; ord(mid(NICART,11)) * pow(256,2) +&lt;BR /&gt; ord(mid(NICART,12)) * pow(256,1) +&lt;BR /&gt; ord(mid(NICART,13)) * pow(256,0)) as [TEST2],&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try a macro too. Don't work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dual(Text(NICART),CvtASCII(NICART) as TEST&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function CvtASCII (txt)&lt;BR /&gt; t = 0&lt;BR /&gt; e = len(txt)-1&lt;BR /&gt;&lt;BR /&gt; For i = 1 to len(txt)&lt;BR /&gt; t = t + asc(mid(txt,i,1)) * (256^e)&lt;BR /&gt; e = e - 1&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt;CvtASCII = t&lt;BR /&gt;End function&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 15:45:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213019#M66839</guid>
      <dc:creator />
      <dc:date>2010-07-07T15:45:30Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213020#M66840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example with new code. '24310031599' is not sorted&lt;/P&gt;&lt;P&gt;Just adds these 3 lines&lt;/P&gt;&lt;P&gt;000YA2301,000YA2301&lt;BR /&gt; 1B4A00ENGIN,1B4A00ENGIN&lt;BR /&gt; 01L27300,01L27300&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3377.qv2.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/3377.qv2.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 16:13:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213020#M66840</guid>
      <dc:creator />
      <dc:date>2010-07-07T16:13:24Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213021#M66841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you figured out the powers of 10 thing. It doesn't work because you have 256 values for ord() assuming you're sticking with the first 256 standard ASCII characters. That's why I was using powers of 256. The parentheses I was using meant I had powers of 256 just like your new version with pow(256,...). I suspect that my version would be slightly faster to calculate, but I like your version better because it seems more clear.&lt;/P&gt;&lt;P&gt;Unfortunately, yeah, QlikView doesn't have enough precision for this to work on that many characters. It might work MOST of the time, but probably wouldn't work on text that is 13 bytes long and only different on the last character, for instance.&lt;/P&gt;&lt;P&gt;So perhaps we need to turn it into a string instead, a purely numeric string, and have it as a separate field, and sort by that field in a sort expression:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;num(ord(mid(NICART,1)),'000')&lt;BR /&gt;&amp;amp;num(ord(mid(NICART,2)),'000')&lt;BR /&gt;&amp;amp;num(ord(mid(NICART,3)),'000')&lt;BR /&gt;... as NICART_SORT&lt;/P&gt;&lt;P&gt;Or something along those lines. Boy, it sure seems like this should be simpler, doesn't it? Surely we're missing something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jul 2010 18:16:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213021#M66841</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-07T18:16:50Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213022#M66842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this one too. Don't seems to work.&lt;BR /&gt;I don't know if i missed something. But it seems to be impossible to use ASCII sort in QlikView !!!&lt;/P&gt;&lt;P&gt;1) If i sort only the first 4 caracters in sort expression it's ok. but the sort must be on 13 caracters (Total 12 caracters of precision)&lt;/P&gt;&lt;P&gt;= num(ord(mid(TEST1, 1)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 2)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 3)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 4)) ,000)&lt;/P&gt;&lt;P&gt;2) If i sort only the first 5 caracters in sort expression. Not Ok (Total 15 caracters of Precision)&lt;/P&gt;&lt;P&gt;= num(ord(mid(TEST1, 1)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 2)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 3)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 4)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 5)) ,000)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) In the script. Too many precision. Not Ok&lt;/P&gt;&lt;P&gt;[Final Table]:&lt;BR /&gt;LOAD&lt;BR /&gt; num(ord(mid(TEST1, 1)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 2)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 3)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 4)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 5)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 6)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 7)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 8)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1, 9)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1,10)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1,11)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1,12)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST1,13)) ,000) as TEST1_ASCII,&lt;BR /&gt;&lt;BR /&gt; num(ord(mid(TEST2, 1)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 2)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 3)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 4)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 5)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 6)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 7)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 8)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2, 9)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2,10)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2,11)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2,12)) ,000) &amp;amp;&lt;BR /&gt; num(ord(mid(TEST2,13)) ,000) as TEST2_ASCII,&lt;BR /&gt;&lt;BR /&gt; *;&lt;BR /&gt;LOAD&lt;BR /&gt; text(TEST1) as TEST1,&lt;BR /&gt; text(TEST2) as TEST2,&lt;BR /&gt; text(TEST3) as TEST3;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; TEST1,&lt;BR /&gt; TEST2,&lt;BR /&gt; TEST3&lt;BR /&gt;FROM QVTEST;&lt;BR /&gt;&lt;BR /&gt;STORE [Final Table] INTO PB_TRI9.qvd;&lt;BR /&gt;DROP TABLE [Final Table];&lt;BR /&gt;&lt;BR /&gt;[Final Table QVD]:&lt;BR /&gt;LOAD * FROM PB_TRI9.qvd (qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/2476.so1.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/2476.so1.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/7587.so2.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/7587.so2.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 08:43:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213022#M66842</guid>
      <dc:creator />
      <dc:date>2010-07-08T08:43:03Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Re: Re. :Re: Re. :Re: Re. :Re: Sorting column in ASCII mode</title>
      <link>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213023#M66843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmmm, yeah, doesn't work. I don't know why.&lt;/P&gt;&lt;P&gt;Is it just me, or do sort expressions pretty much NEVER work? They've failed to work for me so often I don't even TRY using them any more. I ALWAYS try to find another way. Am I just missing something basic about how they're supposed to work??? *grumble*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jul 2010 17:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sorting-column-in-ASCII-mode/m-p/213023#M66843</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-07-08T17:56:50Z</dc:date>
    </item>
  </channel>
</rss>

