<?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 Joining SQL table with Master Calendar. Issue with resident load? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375924#M705310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I have discovered this only happens when I take all fields from the &lt;CODE class="jive-code"&gt;Calendarnew: load into the final load. I created a field 'A' as new in the &lt;/CODE&gt;&lt;CODE class="jive-code"&gt;Calendarnew: table and did not take it to the final &lt;/CODE&gt;&lt;CODE class="jive-code"&gt;NewEmployeeCal: table and it works fine. Why would this cause this issue?&lt;/CODE&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Apr 2012 15:32:36 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-04-03T15:32:36Z</dc:date>
    <item>
      <title>Joining SQL table with Master Calendar. Issue with resident load?</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375923#M705309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I am joining our employee table with our master calendar so that I can do some other links correctly with the date and employee fields. However when I go to create my final table after all the joining it is not staying and the table is gone. Is there something wrong with my script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;Calendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vDateMin = Num(MakeDate(2010,1,1));&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET vDateMax = Floor(YearEnd(Today()));&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET vDateToday = Num(Today());&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET PD = Date(makedate(2010,1,08));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCalendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;$(vDateMin) + RowNo() - 1 AS DateNumber,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Date($(vDateMin) + RowNo() - 1) AS TempDate&amp;nbsp; &lt;/P&gt;&lt;P&gt;AUTOGENERATE 1&amp;nbsp; &lt;/P&gt;&lt;P&gt;WHILE $(vDateMin)+IterNo()-1&amp;lt;= $(vDateMax);&amp;nbsp; &lt;/P&gt;&lt;P&gt;Calendar:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Date(TempDate) AS CalendarDate,&amp;nbsp; &lt;/P&gt;&lt;P&gt;//Date(TempDate) AS&amp;nbsp; calendarlink,&lt;/P&gt;&lt;P&gt;if(if(mod(floor(TempDate)-'$(PD)',14)=0,TempDate)&amp;lt;=date(Today()+18),if(mod(floor(TempDate)-'$(PD)',14)=0,TempDate) )as _PayDay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Standard Date Objects&lt;/P&gt;&lt;P&gt;Day(TempDate) AS CalendarDayOfMonth,&amp;nbsp; &lt;/P&gt;&lt;P&gt;WeekDay(TempDate) AS CalendarDayName,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Week(TempDate) AS CalendarWeekOfYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Month(TempDate) AS CalendarMonthName,&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; Ceil(Month(TempDate)/3) AS CalendarQuarter,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Year(TempDate) AS CalendarYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Calendar Date Names&amp;nbsp; &lt;/P&gt;&lt;P&gt;WeekName(TempDate) as CalendarWeekNumberAndYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;MonthName(TempDate) as CalendarMonthAndYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;QuarterName(TempDate) as CalendarQuarterMonthsAndYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Start Dates&amp;nbsp; &lt;/P&gt;&lt;P&gt;DayStart(TempDate) as CalendarDayStart,&amp;nbsp; &lt;/P&gt;&lt;P&gt;WeekStart(TempDate) as CalendarWeekStart,&amp;nbsp; &lt;/P&gt;&lt;P&gt;MonthStart(TempDate) as CalendarMonthStart,&amp;nbsp; &lt;/P&gt;&lt;P&gt;QuarterStart(TempDate) as CalendarQuarterStart,&amp;nbsp; &lt;/P&gt;&lt;P&gt;YearStart(TempDate) as CalendarYearStart,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// End Dates&amp;nbsp; &lt;/P&gt;&lt;P&gt;DayEnd(TempDate) as CalendarDayEnd,&amp;nbsp; &lt;/P&gt;&lt;P&gt;WeekEnd(TempDate) as CalendarWeekEnd,&amp;nbsp; &lt;/P&gt;&lt;P&gt;MonthEnd(TempDate) as CalendarMonthEnd,&amp;nbsp; &lt;/P&gt;&lt;P&gt;QuarterEnd(TempDate) as CalendarQuarterEnd,&amp;nbsp; &lt;/P&gt;&lt;P&gt;YearEnd(TempDate) as CalendarYearEnd,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Combo Date Examples&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Q' &amp;amp; Ceil(Month(TempDate)/3) &amp;amp; '/' &amp;amp; Year(TempDate) AS CalendarQuarterAndYear,&amp;nbsp; &lt;/P&gt;&lt;P&gt;Year(TempDate) &amp;amp; '/' &amp;amp; 'Q' &amp;amp; Ceil(Month(TempDate)/3) AS CalendarYearAndQuarter,&amp;nbsp; &lt;/P&gt;&lt;P&gt;'Wed ' &amp;amp; DayStart(WeekStart(TempDate) + 3) as CalendarWednesdays&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT TempCalendar ORDER BY TempDate ASC;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TempCalendar;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vDateMin = Num(MakeDate(2010,1,1));&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET vDateMax = Floor(YearEnd(AddMonths(Today(), 12)));&amp;nbsp; &lt;/P&gt;&lt;P&gt;LET vDateToday = Num(Today());&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calendarnew:&amp;nbsp; &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;date( CalendarDate,'WWW') as DayofWeekName,&lt;/P&gt;&lt;P&gt;CalendarDate as 'Calendar Date',&lt;/P&gt;&lt;P&gt;month(CalendarDate) as 'Calendar Month',&lt;/P&gt;&lt;P&gt;year(CalendarDate) as 'Calendar Year',&lt;/P&gt;&lt;P&gt;MonthName(CalendarDate) as 'Calendar Month-Year'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT Calendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Employee:&lt;/P&gt;&lt;P&gt;join (Calendarnew)&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company &amp;amp; '-' &amp;amp; jcdept as jclink,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company &amp;amp; '-' &amp;amp; expensecode as expenselink,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company &amp;amp; '-' &amp;amp; empid as laborheadlink,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company &amp;amp; '-' &amp;amp; empid as laborheadlink2,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; company as Company,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; empid as 'Employee ID',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name as Employee,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; shift as Shift,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; laborrate as 'Labor Rate',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(payroll=1,'Employee','Contract') as 'On Payroll',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(empstatus='A','Active','Inactive') as Status,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; expensecode as 'Expense Code',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jcdept as 'JC Dept. Code',&lt;/P&gt;&lt;P&gt;&amp;nbsp; Plant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Department,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [Plant Short],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(productionworker=1,'Shop','Office') as 'Worker';&lt;/P&gt;&lt;P&gt;SQL SELECT company,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; empid,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; shift,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; laborrate,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; payroll,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; empstatus,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; expensecode,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; jcdept,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; number01,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; number02,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; productionworker&lt;/P&gt;&lt;P&gt;FROM epicor904.dbo.empbasic;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NewEmployeeCal:&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;DayofWeekName,&lt;/P&gt;&lt;P&gt;[Calendar Date],&lt;/P&gt;&lt;P&gt;[Calendar Month],&lt;/P&gt;&lt;P&gt;[Calendar Year],&lt;/P&gt;&lt;P&gt;[Calendar Month-Year],&lt;/P&gt;&lt;P&gt;jclink,&lt;/P&gt;&lt;P&gt;expenselink,&lt;/P&gt;&lt;P&gt;laborheadlink &amp;amp; '-' &amp;amp; [Calendar Date] as laborheadlink,&lt;/P&gt;&lt;P&gt;laborheadlink &amp;amp; '-' &amp;amp; [Calendar Date] as laborheadlink2,&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Company,&lt;/P&gt;&lt;P&gt;[Employee ID],&lt;/P&gt;&lt;P&gt;Employee,&lt;/P&gt;&lt;P&gt;Shift,&lt;/P&gt;&lt;P&gt;[Labor Rate],&lt;/P&gt;&lt;P&gt;[On Payroll],&lt;/P&gt;&lt;P&gt;Status,&lt;/P&gt;&lt;P&gt;[Expense Code],&lt;/P&gt;&lt;P&gt;[JC Dept. Code],&lt;/P&gt;&lt;P&gt;Plant,&lt;/P&gt;&lt;P&gt;Department,&lt;/P&gt;&lt;P&gt;[Plant Short],&lt;/P&gt;&lt;P&gt;Worker&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESIDENT Calendarnew;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Drop Table Calendarnew;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that I removed some of the calculations for confidentiality sake in employee table and just left the new field name. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should have a new table labeled NewEmployeeCal but there is none.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 19:02:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375923#M705309</guid>
      <dc:creator />
      <dc:date>2012-03-29T19:02:07Z</dc:date>
    </item>
    <item>
      <title>Joining SQL table with Master Calendar. Issue with resident load?</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375924#M705310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok I have discovered this only happens when I take all fields from the &lt;CODE class="jive-code"&gt;Calendarnew: load into the final load. I created a field 'A' as new in the &lt;/CODE&gt;&lt;CODE class="jive-code"&gt;Calendarnew: table and did not take it to the final &lt;/CODE&gt;&lt;CODE class="jive-code"&gt;NewEmployeeCal: table and it works fine. Why would this cause this issue?&lt;/CODE&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 15:32:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375924#M705310</guid>
      <dc:creator />
      <dc:date>2012-04-03T15:32:36Z</dc:date>
    </item>
    <item>
      <title>Joining SQL table with Master Calendar. Issue with resident load?</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375925#M705311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Took me ages to figure this one out a couple of years ago - and then I only discovered the reason by accident!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are loading a table with exactly the same structure as a table already resident in memory then QlikView will join them together (but doesnt tell you it has done so!) That's why the addition of your new dummy field prevents this. The proper way to prevent this automatic joining us to preced the second LOAD statement with "NoConcatenate".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tab1:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; A,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; B,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; C&lt;/P&gt;&lt;P&gt;From...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tab2:&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; A,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; B,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; C&lt;/P&gt;&lt;P&gt;From...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 17:02:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375925#M705311</guid>
      <dc:creator>Jason_Michaelides</dc:creator>
      <dc:date>2012-04-03T17:02:15Z</dc:date>
    </item>
    <item>
      <title>Joining SQL table with Master Calendar. Issue with resident load?</title>
      <link>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375926#M705312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, after I posted the last reply I thought it might be doing that. Remembered reading that if 2 tables have the exact same fields it would combine them and was guissing that was what happened so when I dropped the original tables it took the new one with it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Apr 2012 17:06:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Joining-SQL-table-with-Master-Calendar-Issue-with-resident-load/m-p/375926#M705312</guid>
      <dc:creator />
      <dc:date>2012-04-03T17:06:28Z</dc:date>
    </item>
  </channel>
</rss>

