<?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: Problem with decimal values from SQL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50019#M608584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This statement has a problem in syntax- &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Num#&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,' #,##0.00','.')/100 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;I think it should be like - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Num#&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,' #,##0.00',',','.')/100 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9.0pt; font-family: 'Courier New';"&gt;Your dec separater is ',' and thousand separator is '.', right?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Mar 2018 16:06:56 GMT</pubDate>
    <dc:creator>Digvijay_Singh</dc:creator>
    <dc:date>2018-03-19T16:06:56Z</dc:date>
    <item>
      <title>Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50017#M608582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;we have a current Problem with decimal values in QlikView 12.1 SR8, which we get from MS SQL Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data source is a View in MS SQL Server. Format is decimal(18,2).&lt;/P&gt;&lt;P&gt;SQL Output - 10122.84&lt;/P&gt;&lt;P&gt;QlikView Input Default - 10122.84 (Default field)&lt;/P&gt;&lt;P&gt;If I set a numeric Options of the field in QlikView to decimal 14, QlikView Shows - 10.122,84000000000015.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We can Format the Display of the data, but QlikView calculates in background with wrong values.&lt;/P&gt;&lt;P&gt;I made some Tests with any Formats in SQL and QlikView but I cannot find a solution.&lt;/P&gt;&lt;P&gt;Curios, this Problem has not really all numeric values. I would say, 20 percent (see attachment).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimitri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 13:50:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50017#M608582</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-19T13:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50018#M608583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try here&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;=Round(Field, 0.01)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://net-informations.com/q/faq/round.html" title="http://net-informations.com/q/faq/round.html"&gt;How do you round a number to two decimal places C# VB.Net Asp.Net&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 15:49:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50018#M608583</guid>
      <dc:creator>Chanty4u</dc:creator>
      <dc:date>2018-03-19T15:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50019#M608584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This statement has a problem in syntax- &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Num#&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,' #,##0.00','.')/100 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;I think it should be like - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Num#&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;,' #,##0.00',',','.')/100 &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;as&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;V_BETRAG_TEXT&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9.0pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: maroon; font-size: 9.0pt; font-family: 'Courier New';"&gt;Your dec separater is ',' and thousand separator is '.', right?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 16:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50019#M608584</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2018-03-19T16:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50020#M608585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, dec separater is '.'. You can see it in Word attachment, point 3, column V_BETRAG_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With ==Round it doesn't work too. It is the Point 4: &lt;SPAN lang="EN-US" style="margin: 0px; color: blue; line-height: 107%; font-family: 'Courier New'; font-size: 9pt;"&gt;round&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; line-height: 107%; font-family: 'Courier New'; font-size: 9pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: maroon; line-height: 107%; font-family: 'Courier New'; font-size: 9pt;"&gt;V_BETRAG&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; line-height: 107%; font-family: 'Courier New'; font-size: 9pt;"&gt;,0.01) &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: blue; line-height: 107%; font-family: 'Courier New'; font-size: 9pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: black; line-height: 107%; font-family: 'Courier New'; font-size: 9pt;"&gt; &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="margin: 0px; color: maroon; line-height: 107%; font-family: 'Courier New'; font-size: 9pt;"&gt;V_BETRAG_ROUND&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I set Option numeric of field V_BETRAG_ROUND to decimal 14, I have the same Problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 16:18:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50020#M608585</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-19T16:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50021#M608587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black;"&gt;I think you should try to round / truncate the values on the SQL Server query. So you could try something like the code below and see if it cleans your data on the load side. Please let me know if this was helpful. Good luck!&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black;"&gt;Select *, &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: fuchsia; background: white;"&gt;CONVERT&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: gray; background: white;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white;"&gt;money&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: gray; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: fuchsia; background: white;"&gt;ROUND&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: gray; background: white;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black; background: white;"&gt;@exampleNumber&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: gray; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black; background: white;"&gt; 2&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: gray; background: white;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black; background: white;"&gt; 1&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: gray; background: white;"&gt;))&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: blue; background: white;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black; background: white;"&gt; V_BETRAG_MONEY_TEST&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black;"&gt;From someView&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.5pt; font-family: Consolas; color: black;"&gt;&lt;IMG alt="RoundExample.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/196928_RoundExample.PNG" style="height: 193px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2018 20:34:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50021#M608587</guid>
      <dc:creator>wdchristensen</dc:creator>
      <dc:date>2018-03-20T20:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50022#M608588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe helpful:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/3471"&gt;Rounding Errors&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2018 23:51:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50022#M608588</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2018-03-20T23:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50023#M608589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello William, I have not to round the SQL values because SQL datatype already is decimal(18,2). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 08:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50023#M608589</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T08:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with decimal values from SQL</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50024#M608590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, this is a really good Explanation of our Problem. The solution w&lt;SPAN class="short_text" lang="en"&gt;e have to find ourselves.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2018 08:41:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-decimal-values-from-SQL/m-p/50024#M608590</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-03-21T08:41:12Z</dc:date>
    </item>
  </channel>
</rss>

