<?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 and QlikView function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833925#M293411</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;..rather add rhe &lt;STRONG&gt;right&lt;/STRONG&gt; SQL-Where clause to your SQL statement to filter the data on the database side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use preceding LOAD only &lt;SPAN style="text-decoration: underline;"&gt;to transform data, not to filter!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Jun 2015 08:06:52 GMT</pubDate>
    <dc:creator>rbecher</dc:creator>
    <dc:date>2015-06-05T08:06:52Z</dc:date>
    <item>
      <title>SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833917#M293403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi all&lt;/P&gt;&lt;P&gt;I have a problem - how do i get the QlikView loading Script to only bring into Qlikview the selections&lt;/P&gt;&lt;P&gt;where&lt;/P&gt;&lt;P&gt;the date is &amp;lt; (today + 31 days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The minimum date is ok cos I have specified in SQL that it begins on April 1st.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other bit of the problem is that the date comes in as (see below) but I can change it in Qlikview so that it display correctly.&amp;nbsp; Obviously dirty data which somebody will clean up some time!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="WIDTH: 64px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20" width="64"&gt;35:00.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;00:00.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;00:00.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;20:00.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;10:00.0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl63" height="20"&gt;25:00.0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="75"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20" width="75"&gt;19/12/2178&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;1/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;8/01/2016&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;20/08/2173&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;23/07/3006&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" class="xl65" height="20"&gt;16/03/2176&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At one stage I wrote:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SELECT distinct *&lt;BR /&gt;FROM ZZ_Utilisation_trial&lt;/P&gt;&lt;P&gt;where My date &amp;lt; 00:00.0&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that was not accepted ...&lt;/P&gt;&lt;P&gt;Also how come 1/1/2016 is the same as 00:00.0???&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Jo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 07:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833917#M293403</guid>
      <dc:creator>josephinetedesc</dc:creator>
      <dc:date>2015-06-05T07:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833918#M293404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add a PRECEDING LOAD to the SELECT statement, which looks a bit like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD * WHERE [My Date] &amp;lt; (today() + 31);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SELECT ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 07:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833918#M293404</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-06-05T07:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833919#M293405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG style="color: #0000ff; font-size: 8pt;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt;SELECT distinct *&lt;BR /&gt;FROM ZZ_Utilisation_trial&lt;BR /&gt;Where [App_DtTm] &amp;lt; (today() + 31);&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This was the message received:&lt;/P&gt;&lt;P&gt;ErrorSource: Microsoft OLE DB Provider for SQL Server, ErrorMsg: &lt;STRONG&gt;'today' is not a recognized built-in function name.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SQL &lt;/P&gt;&lt;P&gt;SELECT distinct *&lt;/P&gt;&lt;P&gt;FROM ZZ_Utilisation_trial&lt;/P&gt;&lt;P&gt;Where [App_DtTm] &amp;lt; (today() + 31)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 07:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833919#M293405</guid>
      <dc:creator>josephinetedesc</dc:creator>
      <dc:date>2015-06-05T07:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833920#M293406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Josephine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you post the complete part of the script including LOAD and SQL. I guess there is something wrong with the WHERE parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would not use the WHERE clause in preceding LOAD because then you will receive the whole table data from database and filter on QlikView side which could take a huge time..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 07:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833920#M293406</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2015-06-05T07:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833921#M293407</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;You have clean you date field record either while loading data through SQL&lt;/P&gt;&lt;P&gt;or Use suggestion given by Peter there also you need to clear you data then compare with date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;like&lt;/P&gt;&lt;P&gt;Date(Date#([My Date],'DD/MM/YYYY'))&amp;lt; Date(Today() +31)&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num(Date#([My Date],'DD/MM/YYYY'))&amp;lt; Num(Today() +31)&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, 05 Jun 2015 07:54:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833921#M293407</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-06-05T07:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833922#M293408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT distinct *&lt;/P&gt;&lt;P&gt;FROM ZZ_Utilisation_trial&lt;/P&gt;&lt;P&gt;Where [App_DtTm] &amp;lt; (&lt;CODE&gt;&lt;SPAN class="pln"&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;CONVERT&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;date&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; getdate&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;())&lt;/SPAN&gt;&lt;/CODE&gt; + 31)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 07:55:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833922#M293408</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2015-06-05T07:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833923#M293409</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;Today() is QlikView Function not SQL&lt;/P&gt;&lt;P&gt;in SQL you have sysdate()&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, 05 Jun 2015 07:55:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833923#M293409</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2015-06-05T07:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833924#M293410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a bit of advise:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The whole SELECT part is sent to the RDBMS through OLEDB for execution. today() is not a SQL Server function so you will get an error message about that. A PRECEDING LOAD adds a QlikView LOAD statement that is executed by the QV Engine (not SQL engine) immediately after the SELECT and using the data returned by the SELECT statement. today() is a regular QlikView statement, so it will work as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do NOT add my WHERE clause to your SELECT statemenbt because SQL Server won't understand what you mean.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 08:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833924#M293410</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-06-05T08:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: SQL and QlikView function</title>
      <link>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833925#M293411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;..rather add rhe &lt;STRONG&gt;right&lt;/STRONG&gt; SQL-Where clause to your SQL statement to filter the data on the database side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use preceding LOAD only &lt;SPAN style="text-decoration: underline;"&gt;to transform data, not to filter!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Jun 2015 08:06:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/SQL-and-QlikView-function/m-p/833925#M293411</guid>
      <dc:creator>rbecher</dc:creator>
      <dc:date>2015-06-05T08:06:52Z</dc:date>
    </item>
  </channel>
</rss>

