<?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: sql select in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099878#M629397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you have to correct where clause. If your database doesn't like it then you have to figure out what the correct syntax for a where clause is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Aug 2016 12:42:00 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2016-08-12T12:42:00Z</dc:date>
    <item>
      <title>sql select</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099873#M629392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;can you tell if the syntax of the function below is correct ? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Normally i must have in the variable (&lt;SPAN style="font-size: 13.3333px;"&gt;gvNoOfRowsLastLoad ) at least 1 line&amp;nbsp; but apparently i retrieve nothing in the database.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;when i execute the request in the database i have a data.&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;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;LET pSQLWhereClause = 'WHERE DATE_APPLI = To_Date(' &amp;amp; CHR(39) &amp;amp; Date(Date#($(LVDateModif),'YYYYMMDD'),'MM/DD/YYYY') &amp;amp; CHR(39) &amp;amp; ',' &amp;amp; CHR(39) &amp;amp; 'MM/DD/YYYY' &amp;amp; CHR(39) &amp;amp; ') ';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub SrcLoad_LISTE_DATE_APPLI (pSQLTableName,pSQLWhereClause )&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET gvNoOfRowsLastLoad = 0 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // Load the QVD Table from the SQL table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LISTE_DATE_APPLI_MODIFIED:&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD DATE_APPLI; SQL SELECT&amp;nbsp; DATE_APPLI FROM $(gvDBOwner).$(pSQLTableName) $(pSQLWhereClause);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET gvNoOfRowsLastLoad = NoOfRows('LISTE_DATE_APPLI_MODIFIED')&amp;nbsp; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Trace gvNoOfRowsLastLoad : $(gvNoOfRowsLastLoad) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; for vRow = 0 to NoOfRows('LISTE_DATE_APPLI_MODIFIED')&lt;/P&gt;&lt;P&gt;&amp;nbsp; Let MyVar = Peek('DATE_APPLI',vRow-1,'LISTE_DATE_APPLI_MODIFIED');&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALL srLoad_M2R_DTM_ACKTRANSACTION_INCR( pSQLTableName, MyVar) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; next &lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help please ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 08:16:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099873#M629392</guid>
      <dc:creator />
      <dc:date>2016-08-12T08:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: sql select</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099874#M629393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the content of the variables you use. Does &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;LVDateModif have a value? Does &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;pSQLWhereClause get a correct value?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 08:22:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099874#M629393</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-08-12T08:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: sql select</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099875#M629394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes LVDateModif ='20160810' and yes &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;pSQLWhereClause&amp;nbsp; get &lt;/SPAN&gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;WHERE DATE_APPLI = To_Date(' &amp;amp; CHR(39) &amp;amp; Date(Date#($(LVDateModif),'YYYYMMDD'),'MM/DD/YYYY') &amp;amp; CHR(39) &amp;amp; ',' &amp;amp; CHR(39) &amp;amp; 'MM/DD/YYYY' &amp;amp; CHR(39) &amp;amp; ') &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 09:23:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099875#M629394</guid>
      <dc:creator />
      <dc:date>2016-08-12T09:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: sql select</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099876#M629395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, if pSQLWhereClause resolves to &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;pSQLWhereClause = 'WHERE DATE_APPLI = To_Date(' &amp;amp; CHR(39) &amp;amp; Date(Date#($(LVDateModif),'YYYYMMDD'),'MM/DD/YYYY') &amp;amp; CHR(39) &amp;amp; ',' &amp;amp; CHR(39) &amp;amp; 'MM/DD/YYYY' &amp;amp; CHR(39) &amp;amp; ') ' I'm not suprised your SQL database doesn't understand it. It should resolve to something like WHERE DATE_APPLI = To_Date('08/10/2016', 'MM/DD/YYY'),&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 09:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099876#M629395</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-08-12T09:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: sql select</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099877#M629396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that's what i get that means i get&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;WHERE DATE_APPLI = ToDate('08/10/2016', 'MM/DD/YYY')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 12:34:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099877#M629396</guid>
      <dc:creator />
      <dc:date>2016-08-12T12:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: sql select</title>
      <link>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099878#M629397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you have to correct where clause. If your database doesn't like it then you have to figure out what the correct syntax for a where clause is.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Aug 2016 12:42:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/sql-select/m-p/1099878#M629397</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-08-12T12:42:00Z</dc:date>
    </item>
  </channel>
</rss>

