<?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: Union All in QV load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202948#M1208231</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This tip will help me a lot. Hugs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luiz Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2016 13:08:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-04-05T13:08:09Z</dc:date>
    <item>
      <title>Union All in QV load script</title>
      <link>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202943#M1208226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I need to somehow create/simulate the following SQL query with QlikView.&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 * From A&lt;BR /&gt;Union All&lt;BR /&gt;Select * From B&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 05:42:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202943#M1208226</guid>
      <dc:creator />
      <dc:date>2009-09-30T05:42:20Z</dc:date>
    </item>
    <item>
      <title>Union All in QV load script</title>
      <link>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202944#M1208227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="padding-left:30px;"&gt;LOAD * FROM A;&lt;BR /&gt;LOAD * FROM B;&lt;/P&gt;&lt;P&gt;If the two loads have all the same fields, the two tables will be concatenated (union all) automatically. I prefer to be explicit, though, so I would do it like this, which forces concatenation even if some of the fields are different:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;MyTable:&lt;BR /&gt;LOAD * FROM A;&lt;BR /&gt;CONCATENATE (MyTable)&lt;BR /&gt;LOAD * FROM B;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 05:52:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202944#M1208227</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-09-30T05:52:27Z</dc:date>
    </item>
    <item>
      <title>Union All in QV load script</title>
      <link>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202945#M1208228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for taking the time to reply!&lt;/P&gt;&lt;P&gt;I am beginner with QlikView and I am trying to sort things out in my head.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;First of all, can you tell me what's the differecne between LOAD and SELECT?&lt;/LI&gt;&lt;LI&gt;Is it possible to combine the load statement with: &lt;UL&gt;&lt;LI&gt;Left Join&lt;/LI&gt;&lt;LI&gt;Group By&lt;/LI&gt;&lt;LI&gt;Having&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;I also would like to apply some date-specific functions and to do SUM() on some of the fields.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;How do these things work out with the LOAD statement?&lt;/P&gt;&lt;P&gt;The query I have in mind is something like:&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;Select TT.DateField, TT.Month(DateField), Sum(TT.Amount), TT.Num/100, TT.GroupID, TT.AreaID, TT.ProductID, PT.ProductName&lt;BR /&gt;From TransTable as TT&lt;BR style="padding-left:30px;" /&gt;Left Outer Join ProductTable as PT&lt;BR style="padding-left:30px;" /&gt;ON PT.ProductID = TT.ProductID AND TT.AreaID = PT.AreaID&lt;BR /&gt;Group By AreaID, GroupID, ProductID&lt;BR /&gt;Having AreaID = 'DAT', Year(DateField) = Year(GetDate)&lt;BR /&gt;Union All&lt;BR /&gt;...&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;All sorts of suggestions are very welocome.&lt;/P&gt;&lt;P&gt;Thank you again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 07:01:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202945#M1208228</guid>
      <dc:creator />
      <dc:date>2009-09-30T07:01:57Z</dc:date>
    </item>
    <item>
      <title>Union All in QV load script</title>
      <link>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202946#M1208229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Velislav,&lt;BR /&gt;&lt;BR /&gt;1. SELECT - only from database. Within SELECT you can use the SQL syntax the same exactly way as outside of Qlikview.&lt;BR /&gt;LOAD - from file, from previously loaded logical table, "hardcoded" data, preceeding load. In LOAD, you can use Qlikview functions - and there are many.&lt;BR /&gt;&lt;BR /&gt;2. Left Join - yes. It is different for LOAD. You create one table, and after that you can join another to it.&lt;BR /&gt; Group By - yes, both in LOAD and in SELECT&lt;BR /&gt; Having - only in SELECT.&lt;BR /&gt;&lt;BR /&gt;3. There are many ways to do it. You can stay as much in SQL as you want, or leave the bare minimum of it. I'd probably use this:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;LOAD&lt;BR /&gt; DateField as Date,&lt;BR /&gt; date(monthstart(DateField)) as Month,&lt;BR /&gt; sum(Amount) as Amount,&lt;BR /&gt; Num/100 as Num,&lt;BR /&gt; GroupID,&lt;BR /&gt; ProductID,&lt;BR /&gt; ProductName&lt;BR /&gt;WHERE year(DateField)=year(today())&lt;BR /&gt;GROUP BY DateField, Num, GroupID, ProductID, ProductName;&lt;BR /&gt;SQL SELECT&lt;BR /&gt; TT.DateField,&lt;BR /&gt; TT.Amount,&lt;BR /&gt; TT.Num,&lt;BR /&gt; TT.GroupID,&lt;BR /&gt; TT.AreaID,&lt;BR /&gt; TT.ProductID,&lt;BR /&gt; PT.ProductName&lt;BR /&gt;From TransTable as TT&lt;BR /&gt;Left Outer Join ProductTable as PT&lt;BR /&gt; ON PT.ProductID = TT.ProductID AND TT.AreaID = PT.AreaID&lt;BR /&gt;WHERE TT.AreaID='DAT'&lt;BR /&gt;...&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;It maybe not exactly like this, depending on what you want to achieve. &lt;BR /&gt;Answers to all you questions and much more, you can find in QV documentaion and examples. &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 09:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202946#M1208229</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-09-30T09:15:20Z</dc:date>
    </item>
    <item>
      <title>Union All in QV load script</title>
      <link>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202947#M1208230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all, for pointing me in the right direction.&lt;/P&gt;&lt;P&gt;This really helped me!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2009 18:24:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202947#M1208230</guid>
      <dc:creator />
      <dc:date>2009-09-30T18:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Union All in QV load script</title>
      <link>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202948#M1208231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This tip will help me a lot. Hugs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luiz Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 13:08:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Union-All-in-QV-load-script/m-p/202948#M1208231</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-05T13:08:09Z</dc:date>
    </item>
  </channel>
</rss>

