<?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 Adding constant in loaded table with left join in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354603#M706417</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, then you left join by Clients field. Do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;computeJoin:&lt;/P&gt;&lt;P&gt;LEFT JOIN (MAIN)&lt;/P&gt;&lt;P&gt;load * resident COMPUTED;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2012 16:07:29 GMT</pubDate>
    <dc:creator>jvitantonio</dc:creator>
    <dc:date>2012-03-15T16:07:29Z</dc:date>
    <item>
      <title>Adding constant in loaded table with left join</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354600#M706414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a MAIN table in my script from which I want to extract only 2 fields ([cod_gruppo], [polizza_short]) that satisfy 2 criterias ([cod_gruppo]='222' and [polizza_short]='609') grouped by the 2 fields and add to this COMPUTED table a field with a constant value ([constant]='def').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I have the MAIN table and the COMPUTED table (I guess they have to be separate table in order to make the next step) , I want to make a left join between these to tables on the 2 fields ([cod_gruppo], [polizza_short]) so that I can add the field with the constant to the MAIN table on all the fields that appear in che COMPUTED table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure I make myself clear, but especially not sure how to do it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All suggestions are appreciated. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 15:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354600#M706414</guid>
      <dc:creator />
      <dc:date>2012-03-15T15:12:33Z</dc:date>
    </item>
    <item>
      <title>Adding constant in loaded table with left join</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354601#M706415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if I understood but your COMPUTED table will have only 1 record?&lt;/P&gt;&lt;P&gt;[cod_grouppo], [polizza_short], [constante]&lt;/P&gt;&lt;P&gt;222,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 609&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this what you want to accomplish? If this is the case do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAIN:&lt;/P&gt;&lt;P&gt;LOAD * FROM MAINtable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;COMPUTED:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;[cod_gruppo], [polizza_short], 'def' as constant&lt;/P&gt;&lt;P&gt;RESIDENT MAIN&lt;/P&gt;&lt;P&gt;where [cod_gruppo] = '222' and [polizza_short]='609';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you will have the 2 tables. then you can left join them&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 15:21:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354601#M706415</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-03-15T15:21:11Z</dc:date>
    </item>
    <item>
      <title>Adding constant in loaded table with left join</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354602#M706416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for your reply. &lt;/P&gt;&lt;P&gt;Sorry, my mistake. The COMPUTED table will have many records (many&amp;nbsp; [contracts] related to [clients]) that have to be grouped, but only where the fields&amp;nbsp; [cod_gruppo] and [polizza_short] satisfy the conditions. &lt;/P&gt;&lt;P&gt;For all the records resulting from this "filtering" I want to add the computed item. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Having the COMPUTED table, I then want to join it with the MAIN table so that i can "mark" the all the [clients] in the main table where they appear in the COMPUTED table. Forget about the [contract] field in the join.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be easy in MSaccess....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would the code be in order to make a left join between the 2 tables that are now resident in QV?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 15:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354602#M706416</guid>
      <dc:creator />
      <dc:date>2012-03-15T15:58:09Z</dc:date>
    </item>
    <item>
      <title>Adding constant in loaded table with left join</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354603#M706417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, then you left join by Clients field. Do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;computeJoin:&lt;/P&gt;&lt;P&gt;LEFT JOIN (MAIN)&lt;/P&gt;&lt;P&gt;load * resident COMPUTED;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 16:07:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354603#M706417</guid>
      <dc:creator>jvitantonio</dc:creator>
      <dc:date>2012-03-15T16:07:29Z</dc:date>
    </item>
    <item>
      <title>Adding constant in loaded table with left join</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354604#M706418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Not sure I got it all figured out:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load * from [MAIN];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[COMPUTED]:&lt;/P&gt;&lt;P&gt;load [clients], [cod_gruppo], [polizza_short], 'constant' as constant where [polizza_short]='609' and [cod_gruppo] = '222';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join [MAIN]&lt;/P&gt;&lt;P&gt;load * resident COMPUTED;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table COMPUTED;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result of this should be that I have only a MAIN table with a [computed] field that identifies all the records where [polizza_short]='609' and [cod_gruppo] = '222'. &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2012 16:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-constant-in-loaded-table-with-left-join/m-p/354604#M706418</guid>
      <dc:creator />
      <dc:date>2012-03-15T16:28:13Z</dc:date>
    </item>
  </channel>
</rss>

