<?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 dual SQL select to QlikView script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241718#M92111</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;tmp:&lt;BR /&gt;SQL SELECT max(due_date) as due_date FROM aging;&lt;BR /&gt;result:&lt;BR /&gt;LOAD&lt;BR /&gt; due_date,&lt;BR /&gt; account_no,&lt;BR /&gt; id&lt;BR /&gt;WHERE exists(due_date)&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; due_date,&lt;BR /&gt; account_no,&lt;BR /&gt; id&lt;BR /&gt;FROM aging;&lt;BR /&gt;DROP TABLE tmp;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Oct 2010 14:21:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-10-20T14:21:00Z</dc:date>
    <item>
      <title>dual SQL select to QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241714#M92107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I have a SQL statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;select due_date, account_no, id&lt;BR /&gt;from aging where due_date = (select distinct max(due_date) fromaging );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, how can I convert this SQL to QlikView script?&lt;/P&gt;&lt;P&gt;Hope that you can help me solve my problem.. Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lester&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 13:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241714#M92107</guid>
      <dc:creator />
      <dc:date>2010-10-20T13:31:53Z</dc:date>
    </item>
    <item>
      <title>dual SQL select to QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241715#M92108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Have a look at this example below.&lt;/P&gt;&lt;P&gt;Do this same with your Aging table.&lt;/P&gt;&lt;P&gt;No need to write any where condition in SQL.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Tab:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;STOCK_NAME ;DATE ; PRICE; Month&lt;BR /&gt;PETR4 ;02/01/2010 ; 200; Jan&lt;BR /&gt;PETR4 ;03/01/2010 ; 210; Jun&lt;BR /&gt;USIM5 ;02/01/2010 ; 30; Mar&lt;BR /&gt;USIM5 ;03/01/2010 ; 40; Apr&lt;BR /&gt;] (DELIMITER IS ';');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;right join&lt;/P&gt;&lt;P&gt;LOAD date(max(DATE)) as DATE&lt;BR /&gt;Resident Tab;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 13:54:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241715#M92108</guid>
      <dc:creator>syed_muzammil</dc:creator>
      <dc:date>2010-10-20T13:54:16Z</dc:date>
    </item>
    <item>
      <title>dual SQL select to QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241716#M92109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Lester,&lt;/P&gt;&lt;P&gt;why want you do that? Can you tell some backgrounds ? For my opinion, I would leave the filter-work in the source-database. Otherwise your QV may recieve tons of records and has to throw them away because the filter (in QV) doesn't match.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Roland&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 13:57:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241716#M92109</guid>
      <dc:creator />
      <dc:date>2010-10-20T13:57:50Z</dc:date>
    </item>
    <item>
      <title>dual SQL select to QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241717#M92110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi you can use this way&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;Load&lt;BR /&gt;due_date, account_no, id&lt;BR /&gt;;&lt;BR /&gt;select due_date, account_no, id&lt;BR /&gt;from aging where due_date = (select distinct max(due_date) fromaging )&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-weight: bold"&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;t1:&lt;BR /&gt;select due_date, account_no, id from aging;&lt;BR /&gt;t2:&lt;BR /&gt;right (keep OR join)&lt;BR /&gt;Load&lt;BR /&gt;max(due_date) as due_date&lt;BR /&gt;resident t1;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I'm not sure about if it's only max(due_date) in the 2nd method, maybe it's account_no too?? if this is corrrect you will need a group by clause&lt;/P&gt;&lt;P&gt;Rgds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 14:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241717#M92110</guid>
      <dc:creator>hector</dc:creator>
      <dc:date>2010-10-20T14:04:32Z</dc:date>
    </item>
    <item>
      <title>dual SQL select to QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241718#M92111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One more:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;tmp:&lt;BR /&gt;SQL SELECT max(due_date) as due_date FROM aging;&lt;BR /&gt;result:&lt;BR /&gt;LOAD&lt;BR /&gt; due_date,&lt;BR /&gt; account_no,&lt;BR /&gt; id&lt;BR /&gt;WHERE exists(due_date)&lt;BR /&gt;;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; due_date,&lt;BR /&gt; account_no,&lt;BR /&gt; id&lt;BR /&gt;FROM aging;&lt;BR /&gt;DROP TABLE tmp;&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Oct 2010 14:21:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241718#M92111</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-10-20T14:21:00Z</dc:date>
    </item>
    <item>
      <title>dual SQL select to QlikView script</title>
      <link>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241719#M92112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys!&lt;/P&gt;&lt;P&gt;Thanks for your immediate replies.. I will test each of them and comment back which works for me. But the reason why I'm asking for this solution (asked by Roland) is that, I need to get the last payment for each Account that will be later used in my Aging process.. Please see the attached .qvw and you might help me with my problem. I have a "header" and "transaction" tables. I need to include the last Paid amount in header in order to check if its a full payment or partial payment and then process it to check its Aging. The report is somehow different from other Aging report because its the requirement of our client.&lt;/P&gt;&lt;P&gt;I hope you can help me (with my real problem)..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance! I really appreciate your help guys..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lester&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Oct 2010 03:18:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/dual-SQL-select-to-QlikView-script/m-p/241719#M92112</guid>
      <dc:creator />
      <dc:date>2010-10-21T03:18:09Z</dc:date>
    </item>
  </channel>
</rss>

