<?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 transfer SQL query to Qlikview script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396658#M609923</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;I have a query on my SQL server and i would like to transfer it to Qlikview because my tables from now on will be there (one of them is inline) and the other is loaded from file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Have these two Tables on SQL:&lt;/P&gt;&lt;P&gt;1. dbo.cases with fields -&amp;gt; id,start,close (these are the case id, the date the case started, the date case closed)&lt;/P&gt;&lt;P&gt;2. dbo.calendar with fields -&amp;gt; date,daytype (calendar date and daytype=1 for working days or 0 for not working days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My SQL query is:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;SELECT id,start,close,count(daytype) as dayscount&lt;/P&gt;&lt;P&gt;FROM [dbo].[cases]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join [dbo].calendar on (calendar.Date&amp;gt;cases.Start and calendar.Date&amp;lt;=cases.close)&lt;/P&gt;&lt;P&gt;where daytype='1'&lt;/P&gt;&lt;P&gt;group by&amp;nbsp; start,close,id,daytype&lt;/P&gt;&lt;P&gt;order by cases.start desc&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;--------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i don't know how to write the same qry in Qlikview script and any help whould by very valuable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: these SQL query is not working anymore because this SQL Server does not exist and the same tables are now loaded (inline or from file). So i have the data already loaded in my Qlikview document.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Dec 2017 10:30:23 GMT</pubDate>
    <dc:creator>parispantelis</dc:creator>
    <dc:date>2017-12-13T10:30:23Z</dc:date>
    <item>
      <title>transfer SQL query to Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396658#M609923</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;I have a query on my SQL server and i would like to transfer it to Qlikview because my tables from now on will be there (one of them is inline) and the other is loaded from file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I Have these two Tables on SQL:&lt;/P&gt;&lt;P&gt;1. dbo.cases with fields -&amp;gt; id,start,close (these are the case id, the date the case started, the date case closed)&lt;/P&gt;&lt;P&gt;2. dbo.calendar with fields -&amp;gt; date,daytype (calendar date and daytype=1 for working days or 0 for not working days)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My SQL query is:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;SELECT id,start,close,count(daytype) as dayscount&lt;/P&gt;&lt;P&gt;FROM [dbo].[cases]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inner join [dbo].calendar on (calendar.Date&amp;gt;cases.Start and calendar.Date&amp;lt;=cases.close)&lt;/P&gt;&lt;P&gt;where daytype='1'&lt;/P&gt;&lt;P&gt;group by&amp;nbsp; start,close,id,daytype&lt;/P&gt;&lt;P&gt;order by cases.start desc&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;--------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i don't know how to write the same qry in Qlikview script and any help whould by very valuable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: these SQL query is not working anymore because this SQL Server does not exist and the same tables are now loaded (inline or from file). So i have the data already loaded in my Qlikview document.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 10:30:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396658#M609923</guid>
      <dc:creator>parispantelis</dc:creator>
      <dc:date>2017-12-13T10:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: transfer SQL query to Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396659#M609924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can copy paste same in Qlik. It will work&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 11:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396659#M609924</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-12-13T11:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: transfer SQL query to Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396660#M609925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you have resident tables cases and calendar, the using an interval match:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C1:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;EM style="font-size: 13.3333px;"&gt;NoConcatenate&lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD id,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; start,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; close&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident cases&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;T1:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NoConcatenate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD date, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; daytype&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident calendar;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Left Join(T1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Intervalmatch(date)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD start, close resident C1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Join(T1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Intervalmatch(date)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LOAD * resident C1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;drop table C1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may need some cleanup by dropping cases/calendar source tables or adjust table names to integrate with your existing load script/data model.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 11:50:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396660#M609925</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-12-13T11:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: transfer SQL query to Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396661#M609926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the same SQL SELECT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FACT:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT id,start,close,count(daytype) as dayscount&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM [dbo].[cases]&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;inner join [dbo].calendar on (calendar.Date&amp;gt;cases.Start and calendar.Date&amp;lt;=cases.close)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;where daytype='1'&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;group by&amp;nbsp; start,close,id,daytype&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;order by cases.start desc;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 12:05:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396661#M609926</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2017-12-13T12:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: transfer SQL query to Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396662#M609927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;unfortunately it doesn't work...&lt;/P&gt;&lt;P&gt;the sql server does not exist anymore...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 20:21:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396662#M609927</guid>
      <dc:creator>parispantelis</dc:creator>
      <dc:date>2017-12-16T20:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: transfer SQL query to Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396663#M609928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;unfortunately it doesn't work...&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;the sql server does not exist anymore...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Dec 2017 20:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396663#M609928</guid>
      <dc:creator>parispantelis</dc:creator>
      <dc:date>2017-12-16T20:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: transfer SQL query to Qlikview script</title>
      <link>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396664#M609929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i made a few changes and it's working fine&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Dec 2017 09:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/transfer-SQL-query-to-Qlikview-script/m-p/1396664#M609929</guid>
      <dc:creator>parispantelis</dc:creator>
      <dc:date>2017-12-17T09:37:14Z</dc:date>
    </item>
  </channel>
</rss>

