<?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 Re: Join two tables with a field! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295326#M1193418</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;I think below script joins the Login and Calendar field with the common field 'LoginDate' between this two tables. Please correct me if I am wrong! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Login:&lt;/P&gt;&lt;P&gt;Load LoginDate, UserID, Application,'1' as Remark Resident Login1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;JOIN(Login)&lt;BR /&gt;LOAD LoginDate, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quarter, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week&lt;BR /&gt;Resident table; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2011 18:04:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-16T18:04:05Z</dc:date>
    <item>
      <title>Join two tables with a field!</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295324#M1193416</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;May I know how can I join "Login" and "Calendar" table on LoginDate. Please help me out!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Login:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load LoginDate, UserID, Application,'1' as Remark Resident Login1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD LoginDate, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quarter, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week&lt;/P&gt;&lt;P&gt;Resident table;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 14:32:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295324#M1193416</guid>
      <dc:creator />
      <dc:date>2011-06-16T14:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables with a field!</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295325#M1193417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use the sintaxe "JOIN" (INNER / OUTER/ LEFT / RIGHT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Login:&lt;/P&gt;&lt;P&gt;Load LoginDate, UserID, Application,'1' as Remark Resident Login1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;INNER JOIN(Login)&lt;BR /&gt;LOAD LoginDate, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quarter, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week&lt;BR /&gt;Resident table; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 14:57:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295325#M1193417</guid>
      <dc:creator />
      <dc:date>2011-06-16T14:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables with a field!</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295326#M1193418</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;I think below script joins the Login and Calendar field with the common field 'LoginDate' between this two tables. Please correct me if I am wrong! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Login:&lt;/P&gt;&lt;P&gt;Load LoginDate, UserID, Application,'1' as Remark Resident Login1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendar:&lt;BR /&gt;JOIN(Login)&lt;BR /&gt;LOAD LoginDate, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Quarter, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week&lt;BR /&gt;Resident table; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attitude&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 18:04:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295326#M1193418</guid>
      <dc:creator />
      <dc:date>2011-06-16T18:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables with a field!</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295327#M1193419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, the field with some nema are the keys between tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a compost key, you need to concatenate two or N filed in just a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Login:&lt;/P&gt;&lt;P&gt;Load LoginDate &amp;amp; UserID AS PK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Application&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'1' as Remark&lt;/P&gt;&lt;P&gt;Resident Login1;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;Calendar:&lt;BR /&gt;INNER JOIN(Login)&lt;BR /&gt;LOAD LoginDate &amp;amp; UserID AS PK&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Year&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Quarter&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Month&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , Week&lt;BR /&gt;Resident table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you not indicate INNER&amp;nbsp; before JOIN see in your example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JOIN(Login)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script assume the sintaxe OUTER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OUTER JOIN (Login) = JOIN (Login)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 18:10:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295327#M1193419</guid>
      <dc:creator />
      <dc:date>2011-06-16T18:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Join two tables with a field!</title>
      <link>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295328#M1193420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From what I can see you do not need to join and your original script will 'associate' the two LoginDate fields as they have the same name.&amp;nbsp; This should then behave as you want it to.&amp;nbsp; Check the Table Viewer (Ctrl+T) to see if the association has been succesful (names need to be identical, case and all).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If all the calendar fields can be derived from the date you are better off working them out and not having a join at all, thusly:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;CODE class="jive-code"&gt;Login:&lt;BR /&gt;Load &lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(LoginDate, 'DD MMM YYYY') as LoginDate,&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(LoginDate) as Year,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'Q' &amp;amp; (ceil(Month(Date) / 3)) as Quarter,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(LoginDate) as Month,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; week(LoginDate) as Week,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date(monthstart(Date), 'MMM-YY') as [Month Year],&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserID,&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Application,&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '1' as Remark&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt;"&gt;&lt;CODE class="jive-code"&gt;Resident Login1;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;This should be much more effiecient - particularly when you get up to larger data volumes.&amp;nbsp; The script assumes that the field LoginDate is a valid date field - otherwise you will need to nest a Date# function to convert it first.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;- &lt;A href="http://www.quickintelligence.co.uk/"&gt;Steve&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2011 18:43:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Join-two-tables-with-a-field/m-p/295328#M1193420</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2011-06-16T18:43:14Z</dc:date>
    </item>
  </channel>
</rss>

