<?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 How to avoid a join condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-avoid-a-join-condition/m-p/276187#M1178896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd go one step further, that is, since in QlikView you have all records linked, as you say, by the name of the field, and only in case ID is the same in both tables, you only need the ID field in one of either tables! You will select a value in ADDRESS_ID and you will get the values in ID, regardless the table this field is into. And why having twice the same data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, yes, it may be the case that in fact both ID fields are named alike but they store different information. In that case, I'd better have them "separated" not just because QlikView will use them to link two tables and that might return unexpected results, but because they are just different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot prevent QlikView from linking using all fields named the same in different tables, or say "use this field but not this one" if they share names in different tables, and that's one of the powers of this tool, when understod and used properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jan 2012 23:23:25 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2012-01-13T23:23:25Z</dc:date>
    <item>
      <title>How to avoid a join condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-a-join-condition/m-p/276186#M1178895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you have the following simple data set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer Table :&lt;/P&gt;&lt;P&gt;CUSTOMER_ID&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;ADDRESS_ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Address Table : &lt;/P&gt;&lt;P&gt;ADDRESS_ID&lt;/P&gt;&lt;P&gt;ZIP_CODE&lt;/P&gt;&lt;P&gt;ID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there anyway, apart from using an Alias in the script, or a column alias using AS to avoid QV joining the two tables by the ID ? I would like to ensure that the associative join is always via ADDRESS_ID, and that no surrogate key gets created for the ID -&amp;gt; ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One solution is to script the Address table ID AS ADDR_ID for example, but it would be nice if script syntax allowed an equivalent of a SQL WHERE ADDRESS_ID = ADDRESS_ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Andrew.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 20:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-a-join-condition/m-p/276186#M1178895</guid>
      <dc:creator />
      <dc:date>2012-01-13T20:37:03Z</dc:date>
    </item>
    <item>
      <title>How to avoid a join condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-a-join-condition/m-p/276187#M1178896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd go one step further, that is, since in QlikView you have all records linked, as you say, by the name of the field, and only in case ID is the same in both tables, you only need the ID field in one of either tables! You will select a value in ADDRESS_ID and you will get the values in ID, regardless the table this field is into. And why having twice the same data?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, yes, it may be the case that in fact both ID fields are named alike but they store different information. In that case, I'd better have them "separated" not just because QlikView will use them to link two tables and that might return unexpected results, but because they are just different.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You cannot prevent QlikView from linking using all fields named the same in different tables, or say "use this field but not this one" if they share names in different tables, and that's one of the powers of this tool, when understod and used properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that makes sense.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jan 2012 23:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-a-join-condition/m-p/276187#M1178896</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2012-01-13T23:23:25Z</dc:date>
    </item>
    <item>
      <title>How to avoid a join condition</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-avoid-a-join-condition/m-p/276188#M1178897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry - I should have explained that I am working with a vendor data model. The Id field present in both tables in fact has different values. I've found the solution - see post below - but thanks for your advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H1&gt;&lt;A name="kanchor935"&gt;&lt;/A&gt;Qualify&lt;/H1&gt;&lt;P&gt;The automatic join between fields with the same name in different tables can be suspended by means of the &lt;SPAN class="Bold"&gt;qualify&lt;/SPAN&gt; statement, which qualifies the field name with its table name. If qualified, the field name(s) will be renamed when found in a table. The new name will be in the form of &lt;SPAN class="Italic"&gt;tablename.fieldname&lt;/SPAN&gt;. &lt;SPAN class="Italic"&gt;Tablename&lt;/SPAN&gt; is equivalent to the label of the current table, or, if no label exists, to the name appearing after &lt;SPAN class="Bold"&gt;from&lt;/SPAN&gt; in &lt;SPAN class="Bold"&gt;load&lt;/SPAN&gt; and &lt;SPAN class="Bold"&gt;select&lt;/SPAN&gt; statements. &lt;/P&gt;&lt;P&gt;Qualification is always turned off by default at the beginning of script execution. Qualification of a field name can be activated at any time using a &lt;SPAN class="Bold"&gt;qualify&lt;/SPAN&gt; statement. Qualification can be turned off at any time using an &lt;A class="MCXref_0" href="https://community.qlik.com/"&gt;&lt;EM&gt;Unqualify&lt;/EM&gt;&lt;/A&gt; statement. &lt;/P&gt;&lt;P&gt;The syntax is:&lt;/P&gt;&lt;P class="syntax"&gt;&lt;SPAN class="Bold"&gt;qualify&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;*fieldlist&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Italic"&gt;*fieldlist&lt;/SPAN&gt; is a comma separated list of the fields for which qualification should be turned on. Using * as field list indicates all fields. The wildcard characters * and ? are allowed in field names. Quoting of field names may be necessary when wildcards are used.&lt;/P&gt;&lt;P class="note"&gt;&lt;SPAN class="Bold"&gt;Note!&lt;/SPAN&gt; &lt;BR /&gt;The &lt;SPAN class="Bold"&gt;qualify&lt;/SPAN&gt; statement should not be used in conjunction with partial reload! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="example"&gt;Examples:&lt;/P&gt;&lt;P class="Code"&gt;Qualify B;&lt;/P&gt;&lt;P class="Code"&gt;Load A,B from x.csv;&lt;/P&gt;&lt;P class="Code"&gt;Load A,B from y.csv;&lt;/P&gt;&lt;P&gt;The two tables &lt;SPAN class="Bold"&gt;x.csv&lt;/SPAN&gt; and &lt;SPAN class="Bold"&gt;y.csv&lt;/SPAN&gt; are joined only on &lt;SPAN class="Bold"&gt;A&lt;/SPAN&gt;. Three fields will result: A, x.B, y.B. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In an unfamiliar database, start out by making sure that only one or a few fields are associated, as illustrated in this example:&lt;/P&gt;&lt;P class="Code"&gt;qualify *;&lt;/P&gt;&lt;P class="Code"&gt;unqualify TransID;&lt;/P&gt;&lt;P class="Code"&gt;select * from tab1;&lt;/P&gt;&lt;P class="Code"&gt;select * from tab2;&lt;/P&gt;&lt;P class="Code"&gt;select * from tab3;&lt;/P&gt;&lt;P&gt;Only &lt;SPAN class="Bold"&gt;TransID&lt;/SPAN&gt; will be used for associations between the tables &lt;SPAN class="Italic"&gt;tab1&lt;/SPAN&gt;, &lt;SPAN class="Italic"&gt;tab2&lt;/SPAN&gt; and &lt;SPAN class="Italic"&gt;tab3&lt;/SPAN&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jan 2012 10:12:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-avoid-a-join-condition/m-p/276188#M1178897</guid>
      <dc:creator />
      <dc:date>2012-01-16T10:12:58Z</dc:date>
    </item>
  </channel>
</rss>

