<?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: ODBC Read Failed Error in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470660#M175812</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;have u created any connection string to connect to the odbc database??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the exact error..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 May 2013 11:05:07 GMT</pubDate>
    <dc:creator>sushil353</dc:creator>
    <dc:date>2013-05-17T11:05:07Z</dc:date>
    <item>
      <title>ODBC Read Failed Error</title>
      <link>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470659#M175811</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;As I am getting a ODBC read failed error, as I could not find where I am wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;* Date1 is not as a table field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CurrentData:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer_id,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer_Sub,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer_Location,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INVOICE_NUMBER",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INVOICE_AMOUNT",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Today() - [DUEDATE] &amp;lt;= 30,Count(INVOICE_NUMBER)) as NbOverdueInv,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Today() - [DUEDATE] &amp;lt;= 30,Sum(INVOICE_AMOUNT)) as OverdueInvAMT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(INVOICE_NUMBER) as NumInvoices,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(INVOICE_AMOUNT) as TotInvoiceAmt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; SQL SELECT &lt;/P&gt;&lt;P&gt; GetDate() as Date1,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; Customer_id,&lt;/P&gt;&lt;P&gt; Customer_Sub,&lt;/P&gt;&lt;P&gt; Customer_Location,&lt;/P&gt;&lt;P&gt; INVOICE_NUMBER,&lt;/P&gt;&lt;P&gt; INVOICE_AMOUNT,&lt;/P&gt;&lt;P&gt; DUEDATE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM Learn.dbo.FBHH Group by Customer_id,Customer_Sub, Customer_Location,"INVOICE_NUMBER","INVOICE_AMOUNT",DUEDATE;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;STORE CurrentData into CurrentData.qvd(qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 11:01:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470659#M175811</guid>
      <dc:creator />
      <dc:date>2013-05-17T11:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: ODBC Read Failed Error</title>
      <link>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470660#M175812</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;have u created any connection string to connect to the odbc database??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what is the exact error..?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 11:05:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470660#M175812</guid>
      <dc:creator>sushil353</dc:creator>
      <dc:date>2013-05-17T11:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: ODBC Read Failed Error</title>
      <link>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470661#M175813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sushil Kumar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply, Yes, I am using connection string to &lt;STRONG&gt;ODBC CONNECT TO Ms_SQL;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please find the attached error.bmp&lt;BR /&gt;&lt;/STRONG&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;Chriss&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 11:33:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470661#M175813</guid>
      <dc:creator />
      <dc:date>2013-05-17T11:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: ODBC Read Failed Error</title>
      <link>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470662#M175814</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;Is anybody can help me out from the error.&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;Chriss&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 12:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470662#M175814</guid>
      <dc:creator />
      <dc:date>2013-05-17T12:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: ODBC Read Failed Error</title>
      <link>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470663#M175815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp; SQL SELECT&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;GetDate() as Date1,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Customer_id,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Customer_Sub,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Customer_Location,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INVOICE_NUMBER,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INVOICE_AMOUNT,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;DUEDATE&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp; FROM Learn.dbo.FBHH &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;Group by Customer_id,Customer_Sub, Customer_Location,"INVOICE_NUMBER","INVOICE_AMOUNT",DUEDATE&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;You use a group by clause without using any aggregation functions like sum or count in the select part of the sql statement. I think the best solution is to rewrite the sql query to do all the calculations:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp; SQL SELECT&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;GetDate() as Date1,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Customer_id,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Customer_Sub,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;Customer_Location,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INVOICE_NUMBER,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;INVOICE_AMOUNT,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;DUEDATE&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;CASE WHEN GETDATE() - [DUEDATE] &amp;lt;= 30 THEN Count(INVOICE_NUMBER) END as NbOverdueInv,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;CASE WHEN GETDATE() - [DUEDATE] &amp;lt;= 30 THEN &lt;/SPAN&gt;Sum(INVOICE_AMOUNT)&amp;nbsp; END as OverdueInvAMT,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Count(INVOICE_NUMBER) as NumInvoices,&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(INVOICE_AMOUNT) as TotInvoiceAmt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; color: #737373; font-family: Arial;"&gt;FROM Learn.dbo.FBHH Group by GETDATE(),Customer_id,Customer_Sub, Customer_Location,"INVOICE_NUMBER","INVOICE_AMOUNT",DUEDATE;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2013 16:48:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470663#M175815</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-05-17T16:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: ODBC Read Failed Error</title>
      <link>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470664#M175816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Awesome,&amp;nbsp; the script is working fine. can you tell me why this is not worked when I use if condition.&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;Chriss&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 05:57:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/ODBC-Read-Failed-Error/m-p/470664#M175816</guid>
      <dc:creator />
      <dc:date>2013-05-20T05:57:21Z</dc:date>
    </item>
  </channel>
</rss>

