<?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: Normal LOAD translated to SQL SELECT in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15220#M789750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If start_date field in the database is not a number in the same format that QlikView stores dates (e.g.: 41234.0987) then I would suggest instead:&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;WHERE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;code='ABC'&lt;/SPAN&gt; and start_date&amp;lt;='$(vToday)' and end_date&amp;gt;='$(vToday)';&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or double quotes depending on your driver and DBMS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Feb 2018 10:36:01 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2018-02-13T10:36:01Z</dc:date>
    <item>
      <title>Normal LOAD translated to SQL SELECT</title>
      <link>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15219#M789749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have translated my normal load script into SQL Select as I am now connecting to ODBC. Everything works fine except when I incorporate the Today() in my WHERE, suddenly no data is getting loaded. No errors. But no data is showing up. Not sure what is wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ORIGINAL SCRIPT:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; reference_id as ID, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(costs) as TotalCosts&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;[Desktop\Sample Excel.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [Sample Excel]) WHERE code='ABC' and start_date&amp;lt;=Today() and end_date&amp;gt;=Today() Group by reference_id;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;REVISED SCRIPT:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Let vToday = Today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;reference_id as ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(&lt;SPAN style="font-size: 13.3333px;"&gt;costs&lt;/SPAN&gt;) as &lt;SPAN style="font-size: 13.3333px;"&gt;TotalCosts&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Group &lt;SPAN style="font-size: 13.3333px;"&gt;reference_id&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;reference_id&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;costs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;"Table from MS Access"&lt;/P&gt;&lt;P&gt;WHERE &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;code='ABC'&lt;/SPAN&gt; and start_date&amp;lt;=$(vToday) and end_date&amp;gt;=$(vToday);&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/Normal-LOAD-translated-to-SQL-SELECT/m-p/15219#M789749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Normal LOAD translated to SQL SELECT</title>
      <link>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15220#M789750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If start_date field in the database is not a number in the same format that QlikView stores dates (e.g.: 41234.0987) then I would suggest instead:&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;WHERE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;code='ABC'&lt;/SPAN&gt; and start_date&amp;lt;='$(vToday)' and end_date&amp;gt;='$(vToday)';&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Or double quotes depending on your driver and DBMS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 10:36:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15220#M789750</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2018-02-13T10:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Normal LOAD translated to SQL SELECT</title>
      <link>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15221#M789751</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 to verify that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the format of the "DateFormat" variable on your qlikview app is the same that the date format on your sql database.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also try with this on the where:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHERE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;code='ABC'&lt;/SPAN&gt; and start_date&amp;lt;=&lt;STRONG&gt;'&lt;/STRONG&gt;$(vToday)' and end_date&amp;gt;='$(vToday)';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 10:39:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15221#M789751</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2018-02-13T10:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Normal LOAD translated to SQL SELECT</title>
      <link>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15222#M789752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. I realize from reading your response what was wrong with it. The dates in my database apparently was in number format. I changed the variable to:&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;Let &lt;EM&gt;&lt;STRONG style="color: #808080;"&gt;vToday&lt;/STRONG&gt;&lt;/EM&gt; = &lt;SPAN style="color: #0000ff;"&gt;num&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;Today&lt;/SPAN&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;And that solved it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 10:42:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Normal-LOAD-translated-to-SQL-SELECT/m-p/15222#M789752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-13T10:42:39Z</dc:date>
    </item>
  </channel>
</rss>

