<?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 Linking Non keyed tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287687#M1201668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;andrewgb wrote:so how do you manage two foreign keys in a table to the same primary key?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;One common option is to duplicate a table, which isn't practical for your case. But to cover what that would look like just so you know, the table with SClaim_ID and EClaim_ID would stay the same, but your other tables would all get SClaim and EClaim versions, keyed by SClaim_ID and Eclaim_ID respectively, and with all of the other field names renamed to match the table they're on, like for instance SClaim_Date or some such instead of Date. That's a huge amount of extra data and extra complexity, and almost certainly not what we want here.&lt;/P&gt;&lt;P&gt;Another option, perhaps a bit less common, is to create a new table just for the references from the first table. So if your current data looks like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;UniqueKey, SClaim_ID, EClaim_ID, OtherField1, OtherField2&lt;BR /&gt;1, Claim1, Claim2, A, B&lt;/P&gt;&lt;P&gt;You would convert that data to two tables, one of which has two rows for the key:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;UniqueKey, OtherField1, OtherField2&lt;BR /&gt;1, A, B&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;UniqueKey, ClaimType, Claim_ID&lt;BR /&gt;1, SClaim, Claim1&lt;BR /&gt;1, EClaim, Claim2&lt;/P&gt;&lt;P&gt;Converting columns into rows is fairly simple in QlikView. And there's very little extra data here, and the main extra data (ClaimType) will be heavily compressed. So this is a much more practical option than the first, but since I don't know what you want to DO with the data, I can't tell you if it's an appropriate solution. All I can say is that it resolves the linkage problems, because now both claim IDs will map to the other claim tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Nov 2010 22:55:35 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2010-11-11T22:55:35Z</dc:date>
    <item>
      <title>Linking Non keyed tables</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287681#M1201662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 4 tables with a Claim_id and one table that has duplicates and such of claim_ids from all of those tables.&lt;/P&gt;&lt;P&gt;Those fields also have differn't names&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I load a few tables then say link field to field?&lt;/P&gt;&lt;P&gt;like:&lt;/P&gt;&lt;P&gt;link table1.CLAIM_ID to table2.SCLAIM_ID&lt;/P&gt;&lt;P&gt;Its a basic question but I haven't a good answer other than do a join which I can't do with the table structure&lt;/P&gt;&lt;DIV&gt;thanks for the help&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 19:11:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287681#M1201662</guid>
      <dc:creator />
      <dc:date>2010-11-11T19:11:29Z</dc:date>
    </item>
    <item>
      <title>Linking Non keyed tables</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287682#M1201663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In one of the tables, you can load the field a second time using the same name as in the other table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 19:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287682#M1201663</guid>
      <dc:creator />
      <dc:date>2010-11-11T19:16:10Z</dc:date>
    </item>
    <item>
      <title>Linking Non keyed tables</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287683#M1201664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im not sure i understand&lt;/P&gt;&lt;P&gt;Well I apologize if i'm not explaining this well, I'm stuck in a all day meeting. But essentially I have a table that has 2 entries of the claim_id field, due to this ones called Sclaim_id, and ones called Eclaim_id. Those can be populated by a claim_id from one of 4 other tables. So I cant enforce a key. I cant do a join also because i'm working million of rows so i would need to do 8 joins on 5 tables which would be a huge performance hit just to load the tables. So i'm hoping i can load the 5 tables then say point this to this and such.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 19:34:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287683#M1201664</guid>
      <dc:creator />
      <dc:date>2010-11-11T19:34:58Z</dc:date>
    </item>
    <item>
      <title>Linking Non keyed tables</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287684#M1201665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i thought maybe i could define a set of synthetic keys and give those the same name to tie it all together but im not sure if that would work or how to do it&lt;/P&gt;&lt;P&gt;$Syn1: select claim_id from table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 19:38:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287684#M1201665</guid>
      <dc:creator />
      <dc:date>2010-11-11T19:38:34Z</dc:date>
    </item>
    <item>
      <title>Linking Non keyed tables</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287685#M1201666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So, if I understand...&lt;/P&gt;&lt;P&gt;Table 1 has:&lt;BR /&gt;SClaim_ID&lt;BR /&gt;EClaim_ID (which happens to be a duplicate of SClaim_ID)&lt;/P&gt;&lt;P&gt;Tables 2 - 4 have&lt;BR /&gt;Claim_ID&lt;/P&gt;&lt;P&gt;Am I close?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 20:13:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287685#M1201666</guid>
      <dc:creator />
      <dc:date>2010-11-11T20:13:25Z</dc:date>
    </item>
    <item>
      <title>Linking Non keyed tables</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287686#M1201667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats about right I forgot the database name for it but i'm doing a choose from 4 tables for claim ids.&lt;/P&gt;&lt;P&gt;Essentially I have a table that says 1 claim flags another 1, those claim come from 4 tables that have different field sets. They sum well over 300 columns so Cant be put in a single table, but by design and the type of data and queries run on it are de-normalized for performance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so how do you manage two foreign keys in a table to the same primary key?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 20:47:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287686#M1201667</guid>
      <dc:creator />
      <dc:date>2010-11-11T20:47:29Z</dc:date>
    </item>
    <item>
      <title>Linking Non keyed tables</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287687#M1201668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;andrewgb wrote:so how do you manage two foreign keys in a table to the same primary key?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;One common option is to duplicate a table, which isn't practical for your case. But to cover what that would look like just so you know, the table with SClaim_ID and EClaim_ID would stay the same, but your other tables would all get SClaim and EClaim versions, keyed by SClaim_ID and Eclaim_ID respectively, and with all of the other field names renamed to match the table they're on, like for instance SClaim_Date or some such instead of Date. That's a huge amount of extra data and extra complexity, and almost certainly not what we want here.&lt;/P&gt;&lt;P&gt;Another option, perhaps a bit less common, is to create a new table just for the references from the first table. So if your current data looks like this:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;UniqueKey, SClaim_ID, EClaim_ID, OtherField1, OtherField2&lt;BR /&gt;1, Claim1, Claim2, A, B&lt;/P&gt;&lt;P&gt;You would convert that data to two tables, one of which has two rows for the key:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;UniqueKey, OtherField1, OtherField2&lt;BR /&gt;1, A, B&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;UniqueKey, ClaimType, Claim_ID&lt;BR /&gt;1, SClaim, Claim1&lt;BR /&gt;1, EClaim, Claim2&lt;/P&gt;&lt;P&gt;Converting columns into rows is fairly simple in QlikView. And there's very little extra data here, and the main extra data (ClaimType) will be heavily compressed. So this is a much more practical option than the first, but since I don't know what you want to DO with the data, I can't tell you if it's an appropriate solution. All I can say is that it resolves the linkage problems, because now both claim IDs will map to the other claim tables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Nov 2010 22:55:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-Non-keyed-tables/m-p/287687#M1201668</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-11-11T22:55:35Z</dc:date>
    </item>
  </channel>
</rss>

