<?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 Left joins with resident table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155185#M31525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. This is what I am trying to do. I have a table called ZTRSPST. This table contains jobs we have worked and completed, and jobs we have worked and not completed. Here is an example:&lt;/P&gt;&lt;P&gt;Contract / Line(Key) Date Status Hours Worked&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/07/2010 I 12&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/07/2010 I 6&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/10/2010 C 12&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/10/2010 C 6&lt;/P&gt;&lt;P&gt;If a job has not yet been completed (no "C"), then I need to use the incomplete ("I"), else if the job has been completed I need to use "C". Is there an easy way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Feb 2010 12:44:47 GMT</pubDate>
    <dc:creator>tmumaw</dc:creator>
    <dc:date>2010-02-23T12:44:47Z</dc:date>
    <item>
      <title>Left joins with resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155182#M31522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone what could be wrong with my left join statement? I know I am missing something real simple.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;ZTRPSTEMP:&lt;BR /&gt;LOAD %ContractItemKey as ContractItemKey,&lt;BR /&gt; Status,&lt;BR /&gt; Date,&lt;BR /&gt; date(floor(weekend(Date, 0, -1)),'YYYY-MM-DD') as WEDATTemp,&lt;BR /&gt; sum(Hours) as [Hrs Worked]&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt; where Status = 'C' //and %ContractItemKey = '00425409810020'&lt;BR /&gt; group by %ContractItemKey, Status, Date;&lt;BR /&gt;&lt;BR /&gt;Join (ZTRPSTEMP)&lt;BR /&gt;LOAD %ContractItemKey,&lt;BR /&gt; Status,&lt;BR /&gt; Date,&lt;BR /&gt; date(floor(weekend(Date, 0, -1)),'YYYY-MM-DD') as WEDATTemp,&lt;BR /&gt; sum(Hours) as [Hrs Worked]&lt;BR /&gt;FROM &lt;D&gt; (qvd)&lt;BR /&gt; // where %ContractItemKey = '00425409810020'&lt;BR /&gt; group by %ContractItemKey, Status, Date;&lt;/D&gt;&lt;/D&gt;&lt;/P&gt;&lt;P&gt;ZTRSPSTEMP1:&lt;BR /&gt;noconcatenate&lt;BR /&gt;load&lt;BR /&gt; %ContractItemKey,&lt;BR /&gt; Status,&lt;BR /&gt; Date,&lt;BR /&gt; date(floor(weekend(Date, 0, -1)),'YYYY-MM-DD') as WEDATTemp,&lt;BR /&gt; [Hrs Worked],&lt;BR /&gt; if(ContractItemKey = %ContractItemKey,'1',2) as [Complete Ind]&lt;BR /&gt;resident ZTRPSTEMP;&lt;/P&gt;&lt;P&gt;ZTRSPSTEMP1:&lt;BR /&gt;LEFT JOIN (VBAKTemp)&lt;BR /&gt; LOAD&lt;BR /&gt; %ContractItemKey,&lt;BR /&gt; Status,&lt;BR /&gt; Date,&lt;BR /&gt; date(floor(weekend(Date, 0, -1)),'YYYY-MM-DD') as WEDATTemp,&lt;BR /&gt; [Hrs Worked]&lt;BR /&gt;RESIDENT ZTRPSTEMP1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 21:21:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155182#M31522</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2010-02-22T21:21:50Z</dc:date>
    </item>
    <item>
      <title>Left joins with resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155183#M31523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I understand in first load from ZTRPST.QVD you are getting sum of hours worked against completed (Status = 'C') contracts. Not sure what you are doing in second time load. What are you trying to join?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 21:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155183#M31523</guid>
      <dc:creator>disqr_rm</dc:creator>
      <dc:date>2010-02-22T21:54:18Z</dc:date>
    </item>
    <item>
      <title>Left joins with resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155184#M31524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, there's no table VBAKTemp table defined to join to. You might have one in the script, but it isn't in the section of the script you posted. You also shouldn't state your source table name ABOVE the left join. That's what your RESIDENT statement is for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2010 21:54:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155184#M31524</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-02-22T21:54:44Z</dc:date>
    </item>
    <item>
      <title>Left joins with resident table</title>
      <link>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155185#M31525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. This is what I am trying to do. I have a table called ZTRSPST. This table contains jobs we have worked and completed, and jobs we have worked and not completed. Here is an example:&lt;/P&gt;&lt;P&gt;Contract / Line(Key) Date Status Hours Worked&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/07/2010 I 12&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/07/2010 I 6&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/10/2010 C 12&lt;/P&gt;&lt;P&gt;0042540981 / 0020 02/10/2010 C 6&lt;/P&gt;&lt;P&gt;If a job has not yet been completed (no "C"), then I need to use the incomplete ("I"), else if the job has been completed I need to use "C". Is there an easy way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Feb 2010 12:44:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Left-joins-with-resident-table/m-p/155185#M31525</guid>
      <dc:creator>tmumaw</dc:creator>
      <dc:date>2010-02-23T12:44:47Z</dc:date>
    </item>
  </channel>
</rss>

