<?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 Multiple Load Keywords in a Single Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232483#M84095</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first is selecting three fields from a QVD, simple and obvious.&lt;/P&gt;&lt;P&gt;The second is actually doing three loads in a row, and in the opposite order of what you see. FIRST, it loads Z from the QVD. THEN it tries to load Y from what it just loaded. There is no such field in what it already loaded, since you only loaded Z, so it will fail at that point.&lt;/P&gt;&lt;P&gt;To give a more realistic example:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LOAD *&lt;BR /&gt;,year(MyDate) as MyYear&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt; MyID&lt;BR /&gt;,MyDate&lt;BR /&gt;FROM My.qvd (QVD)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;First this loads two fields from the QVD, MyID and MyDate. THEN, it goes through every row of that table, and loads those two fields, but adds a new field MyYear. By way of comparison, you can create the exact same table with this simpler script:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LOAD&lt;BR /&gt; MyID&lt;BR /&gt;,MyDate&lt;BR /&gt;,year(MyDate) as MyYear&lt;BR /&gt;FROM My.qvd (QVD)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;But the two scripts will not actually behave the same way. In the first script, the QVD load is an optimized load, which means it will execute very quickly. Adding the new field on top of that will add time, but I suspect the whole thing will still execute more quickly than the second script, which does not use an optimized load. Hard to know without testing, of course.&lt;/P&gt;&lt;P&gt;In any case, the two things to remember are that each load pulls data only from the previous load, and that the previous load in this case is the load BELOW, not the load ABOVE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Nov 2009 07:01:44 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2009-11-05T07:01:44Z</dc:date>
    <item>
      <title>Multiple Load Keywords in a Single Script</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232482#M84094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the difference between&lt;/P&gt;&lt;P&gt;Load X, Y, Z From XYZ.qvd&lt;/P&gt;&lt;P&gt;VS&lt;/P&gt;&lt;P&gt;Load X;&lt;/P&gt;&lt;P&gt;Load Y;&lt;/P&gt;&lt;P&gt;Load Z From XYZ.qvd????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 06:40:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232482#M84094</guid>
      <dc:creator />
      <dc:date>2009-11-05T06:40:17Z</dc:date>
    </item>
    <item>
      <title>Multiple Load Keywords in a Single Script</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232483#M84095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first is selecting three fields from a QVD, simple and obvious.&lt;/P&gt;&lt;P&gt;The second is actually doing three loads in a row, and in the opposite order of what you see. FIRST, it loads Z from the QVD. THEN it tries to load Y from what it just loaded. There is no such field in what it already loaded, since you only loaded Z, so it will fail at that point.&lt;/P&gt;&lt;P&gt;To give a more realistic example:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LOAD *&lt;BR /&gt;,year(MyDate) as MyYear&lt;BR /&gt;;&lt;BR /&gt;LOAD&lt;BR /&gt; MyID&lt;BR /&gt;,MyDate&lt;BR /&gt;FROM My.qvd (QVD)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;First this loads two fields from the QVD, MyID and MyDate. THEN, it goes through every row of that table, and loads those two fields, but adds a new field MyYear. By way of comparison, you can create the exact same table with this simpler script:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;LOAD&lt;BR /&gt; MyID&lt;BR /&gt;,MyDate&lt;BR /&gt;,year(MyDate) as MyYear&lt;BR /&gt;FROM My.qvd (QVD)&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;But the two scripts will not actually behave the same way. In the first script, the QVD load is an optimized load, which means it will execute very quickly. Adding the new field on top of that will add time, but I suspect the whole thing will still execute more quickly than the second script, which does not use an optimized load. Hard to know without testing, of course.&lt;/P&gt;&lt;P&gt;In any case, the two things to remember are that each load pulls data only from the previous load, and that the previous load in this case is the load BELOW, not the load ABOVE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 07:01:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232483#M84095</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2009-11-05T07:01:44Z</dc:date>
    </item>
    <item>
      <title>Multiple Load Keywords in a Single Script</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232484#M84096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you dont mean this syntax literally... Literally speaking, the second syntax is incorrect...&lt;/P&gt;&lt;P&gt;What you probably mean is how to read a series of preceding loads... When a load statement doesn't have any "from" or "resident" or any other sources, it's called "preceding load" - in this case, it takes the data from the following load statement. Preceding loads are typically used in conjunction with database loads, to rename and process the data coming from the database, and also to re-use new calculated fields, to avoid repeating the same formula numerous times&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;load *, AddMonths( BeginningOfMonth , -1) as PreviousMonth;&lt;/P&gt;&lt;P&gt;load *, MonthStart(Date) as BeginningOfMonth;&lt;/P&gt;&lt;P&gt;load ...,&lt;/P&gt;&lt;P&gt;makedate(X,Y,Z) as Date,&lt;/P&gt;&lt;P&gt;... from Data.QVD;&lt;/P&gt;&lt;P&gt;In this example, Date is calculated in the initial (bottom) load. Then MonthStart is calculated in the second preceding load, and the previous month is calculated in the third load. Obviously, this is just to demonstrate the feature...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 07:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232484#M84096</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2009-11-05T07:08:46Z</dc:date>
    </item>
    <item>
      <title>Multiple Load Keywords in a Single Script</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232485#M84097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Oleg and John.&lt;/P&gt;&lt;P&gt;I understand that now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 07:38:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-Load-Keywords-in-a-Single-Script/m-p/232485#M84097</guid>
      <dc:creator />
      <dc:date>2009-11-05T07:38:44Z</dc:date>
    </item>
  </channel>
</rss>

