<?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: 19-digit character in SQL db in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166226#M893434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK could qlikview not handle such big numbers else only until 14 digits. But to load them as text should work, maybe within a preceeding load on top your sql, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, text(TRAN_ID) as TRAN_ID_TEXT;&lt;/P&gt;&lt;P&gt;SQL SELECT * From Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Aug 2016 14:14:34 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-08-10T14:14:34Z</dc:date>
    <item>
      <title>19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166223#M893431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a 19-digit TRAN_ID with data type bigint in a SQL database. it might look like this: 2314885530818453536&lt;/P&gt;&lt;P&gt;When I load it into QlikView it ends up like this: 2.3148855308185e+018&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've had this before and got it to work by doing the below load method but this time it doesn't work and I don't understand why:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD text(TRAN_ID) as TRAN_ID from XXX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT CAST(TRAN_ID as varchar) as TRAN_ID,*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also tried other options to varchar but it just refuses to work. What am I doing wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166223#M893431</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166224#M893432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD NUM((TRAN_ID),'###################') as TRAN_ID from XXX&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT CAST(TRAN_ID as varchar) as TRAN_ID,*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:03:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166224#M893432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-10T14:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166225#M893433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Doesn't work - everything then changes to 92233720368547&lt;STRONG style="text-decoration: underline;"&gt;80000&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The last few digits are being dropped.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:07:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166225#M893433</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2016-08-10T14:07:15Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166226#M893434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK could qlikview not handle such big numbers else only until 14 digits. But to load them as text should work, maybe within a preceeding load on top your sql, like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load *, text(TRAN_ID) as TRAN_ID_TEXT;&lt;/P&gt;&lt;P&gt;SQL SELECT * From Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:14:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166226#M893434</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-08-10T14:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166227#M893435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in the load, try to keep the TRAN_ID as a text and convert to char in the SQL part&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;LOAD &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TRAN_ID,&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...............&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;SQL &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt; SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CAST(TRAN_ID as varchar) as TRAN_ID,&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt; FROM&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .......................&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:25:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166227#M893435</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-08-10T14:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166228#M893436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try this just wondering ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;Num#(TRAN_ID) AS Tran_ID&lt;/P&gt;&lt;P&gt;.....;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Aug 2016 14:25:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166228#M893436</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2016-08-10T14:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166229#M893437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I've tried already, as posted in my question originally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tried with and without casting in SQL select statement&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 05:13:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166229#M893437</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2016-08-11T05:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166230#M893438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 05:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166230#M893438</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2016-08-11T05:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166231#M893439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, but doesn't work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 05:15:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166231#M893439</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2016-08-11T05:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166232#M893440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe not the most elegant approaches but two different workarounds which should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;text(keepchar(TRAN_ID_2, '0123456789')) as TRAN_ID_TEXT&lt;/P&gt;&lt;P&gt;text(TRAN_ID_PART_1 &amp;amp; TRAN_ID_PART_2) as TRAN_ID_TEXT_2;&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;*,&lt;/P&gt;&lt;P&gt;'#' &amp;amp; TRAN_ID &amp;amp; '#' as TRAN_ID_2,&lt;/P&gt;&lt;P&gt;mid(TRAN_ID, 1, 9) as TRAN_ID_PART_1,&lt;/P&gt;&lt;P&gt;mid(TRAN_ID, 10) as TRAN_ID_PART_2&lt;/P&gt;&lt;P&gt;From Source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 05:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166232#M893440</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-08-11T05:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166233#M893441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this i am not sure,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Text(Train ID) in dimension Expression &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 05:44:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166233#M893441</guid>
      <dc:creator />
      <dc:date>2016-08-11T05:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166234#M893442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried on a sql server db and it works, see the image with sql server (top) and qlik result (bottom)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD text(TRAN_ID) as TRAN_ID;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;cast(TRAN_ID as varchar) as TRAN_ID&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM "C4PLATINUM_BENZINE".dbo."Table_1";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD text(TRAN_ID) as TRAN_ID;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;convert(varchar, TRAN_ID) as TRAN_ID&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM "C4PLATINUM_BENZINE".dbo."Table_1";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/134273_1.png" style="height: 462px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 07:53:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166234#M893442</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-08-11T07:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166235#M893443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="SQL DB.jpg" class="jive-image image-1" src="/legacyfs/online/134263_SQL DB.jpg" style="height: 411px; width: 620px;" /&gt;&lt;IMG alt="QV.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/134294_QV.jpg" style="height: 241px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:54:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166235#M893443</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2016-08-11T09:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166236#M893444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: Argument data type bigint is invalid for argument 1 of substring function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 09:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166236#M893444</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2016-08-11T09:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166237#M893445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I got this right by accident, and I still don't know WHY this fix works, but it does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had this in my SQL select statement, which then returned &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2.3148855308185e+018:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SQL SELECT cast(TRAN_ID as varchar) as TRAN_ID&lt;SPAN style="color: #ff0000;"&gt;, *&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;I then changed it to this, and then it works and returns &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;2314885530818453536&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;SQL SELECT &lt;SPAN style="color: #3366ff;"&gt;*,&lt;/SPAN&gt; cast(TRAN_ID as varchar) as TRAN_ID&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;So literally the only "fix" was to move the asterisk which selects all the other fields to the front of the CAST function. When the CAST function comes first it for some reason doesn't work properly.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Makes no sense (to me).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 10:06:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166237#M893445</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2016-08-11T10:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: 19-digit character in SQL db</title>
      <link>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166238#M893446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I think it doesn't because you use &lt;STRONG&gt;select *&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;This works for me (without select * but with other fields)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;It seems the select * has a side effect on cast(....), I think because with select * you extract twice the TRAN_ID&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD text(TRAN_ID) as TRAN_ID, col1, col2;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;col1, col2, cast(TRAN_ID as varchar) as TRAN_ID&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FROM "Table_1" t;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and also this&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;EM&gt;SQL SELECT &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;EM&gt;cast(TRAN_ID as varchar) as TRAN_ID, &lt;EM style="font-size: 13.3333px;"&gt;col1, col2&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;EM&gt;FROM "C4PLATINUM_BENZINE".dbo."Table_1" t;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/134324_1.png" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2016 12:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/19-digit-character-in-SQL-db/m-p/1166238#M893446</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-08-11T12:09:54Z</dc:date>
    </item>
  </channel>
</rss>

