<?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: Oracle SQL Where Clause using date variable for filter in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Oracle-SQL-Where-Clause-using-date-variable-for-filter/m-p/1579684#M442749</link>
    <description>&lt;P&gt;Sugiro fazer uma formatação da variável e do campo de busca para o mesmo formato de data conforme exemplo abaixo.&lt;/P&gt;&lt;P&gt;A variável ficaria assim:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Let vThisExecTime=Timestamp(Now(),'YYYY-MM-DD hh:mm:ss'); 

Let vLastExecTime = Timestamp(If(IsNull(QvdCreateTime('$(vQVDPath)EMP_ALLOC.QVD')), 0, ConvertToLocalTime(QvdCreateTime('$(vQVDPath)EMP_ALLOC.QVD'), 'GMT', 1)), 'YYYY-MM-DD hh:mm:ss');&lt;/LI-CODE&gt;&lt;P&gt;E a claúsula WHERE ficaria assim:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;WHERE to_char(LAST_UPDT,'YYYY-MM-DD hh24:mm:ss')&amp;gt;='$(vLastExecTime)'
AND to_char(LAST_UPDT,'YYYY-MM-DD hh24:mm:ss')&amp;lt;'$(vThisExecTime)';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 13 May 2019 18:50:46 GMT</pubDate>
    <dc:creator>Ezirraffner</dc:creator>
    <dc:date>2019-05-13T18:50:46Z</dc:date>
    <item>
      <title>Oracle SQL Where Clause using date variable for filter</title>
      <link>https://community.qlik.com/t5/QlikView/Oracle-SQL-Where-Clause-using-date-variable-for-filter/m-p/1215005#M389298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have following script to fetch and load data into incremental qvd and failing at date conversion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LIB CONNECT TO 'oradb';&lt;/P&gt;&lt;P&gt;Set vQVDPath = QVDs/; &lt;/P&gt;&lt;P&gt;Set vThisExecTime=Now();&lt;/P&gt;&lt;P&gt;Let vLastExecTime = Timestamp(If(IsNull(QvdCreateTime('$(vQVDPath)EMP_ALLOC.QVD')), 0, ConvertToLocalTime(QvdCreateTime('$(vQVDPath)EMP_ALLOC.QVD'), 'GMT', 1)), 'YYYY-MM-DD hh:mm:ss');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EMP_ALLOC:&lt;/P&gt;&lt;P&gt;SELECT EMP_ID,SHIFT_DT,SHIFT_NO,SUPERVISOR_ID,LAST_UPDT&lt;/P&gt;&lt;P&gt;FROM EMP_ALLOC&lt;/P&gt;&lt;P&gt;WHERE LAST_UPDT&amp;gt;='$(vLastExecTime)'&lt;/P&gt;&lt;P&gt;AND LAST_UPDT&amp;lt;'$(vThisExecTime)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/154964_pastedImage_2.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/154915_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 06:37:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Oracle-SQL-Where-Clause-using-date-variable-for-filter/m-p/1215005#M389298</guid>
      <dc:creator />
      <dc:date>2017-03-02T06:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle SQL Where Clause using date variable for filter</title>
      <link>https://community.qlik.com/t5/QlikView/Oracle-SQL-Where-Clause-using-date-variable-for-filter/m-p/1579684#M442749</link>
      <description>&lt;P&gt;Sugiro fazer uma formatação da variável e do campo de busca para o mesmo formato de data conforme exemplo abaixo.&lt;/P&gt;&lt;P&gt;A variável ficaria assim:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Let vThisExecTime=Timestamp(Now(),'YYYY-MM-DD hh:mm:ss'); 

Let vLastExecTime = Timestamp(If(IsNull(QvdCreateTime('$(vQVDPath)EMP_ALLOC.QVD')), 0, ConvertToLocalTime(QvdCreateTime('$(vQVDPath)EMP_ALLOC.QVD'), 'GMT', 1)), 'YYYY-MM-DD hh:mm:ss');&lt;/LI-CODE&gt;&lt;P&gt;E a claúsula WHERE ficaria assim:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;WHERE to_char(LAST_UPDT,'YYYY-MM-DD hh24:mm:ss')&amp;gt;='$(vLastExecTime)'
AND to_char(LAST_UPDT,'YYYY-MM-DD hh24:mm:ss')&amp;lt;'$(vThisExecTime)';&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 18:50:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Oracle-SQL-Where-Clause-using-date-variable-for-filter/m-p/1579684#M442749</guid>
      <dc:creator>Ezirraffner</dc:creator>
      <dc:date>2019-05-13T18:50:46Z</dc:date>
    </item>
  </channel>
</rss>

