<?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. :Performing a join on data loaded from SQL and Excel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202890#M60432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand this fully? Is the idea that you must LOAD all field names that you use in the SQL SELECT statement first? If so that seems lik a lot of replication. My sample I show is a shortened version for the purposes of saving space here, my actuall SELECT statement contains many many field names, using aliases etc.&lt;/P&gt;&lt;P&gt;I also don't understand why the "Number of Incidents" is included in the Join stmt. I want to join on the field CostCenter. My previous experience with joins is solely with SQL so perhaps I'm missing something here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jun 2010 18:47:01 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-06-25T18:47:01Z</dc:date>
    <item>
      <title>Performing a join on data loaded from SQL and Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202888#M60430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone ;&lt;/P&gt;&lt;P&gt;I'm trying to load two tables into a Qlikview document and perform a join. I normally do this with two SQL tables and have no issues doing so. However the new table I'm loading is coming from Excel and I'm having trouble with the sytax for this.&lt;/P&gt;&lt;P&gt;I tried just loading the two tables but for some reason it does not load the data from table 1 if there is no corresponding data in table 2. I show a basic sample below.&lt;/P&gt;&lt;P&gt;I'd like to join on CostCenter - can anyone kindly help me with the correct syntax. I think I need to use the resident command but can't seem to get it to work.&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StockShortages:&lt;BR /&gt;ODBC CONNECT TO [Excel Files;DBQ=D:\Data\My Documents\Qlikview\Short Report.xls];&lt;BR /&gt;SQL SELECT&lt;BR /&gt; CostCenter,&lt;BR /&gt; Period,&lt;BR /&gt; `Over/Short`,&lt;BR /&gt; `Net Sales`&lt;BR /&gt;FROM `D:\Data\My Documents\Qlikview\Short Report`.`'By Store$'`;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;a.CostCenter, a."Number of Incidents"&lt;BR /&gt;FROM RPS_Main.dbo.v_IncidentReporting a&lt;BR /&gt;WHERE a."Case Year" &amp;gt;= '2005';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jun 2010 17:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202888#M60430</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-25T17:22:12Z</dc:date>
    </item>
    <item>
      <title>Re. :Performing a join on data loaded from SQL and Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202889#M60431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Join belongs to qlikview script function's , so we must use load before sql select... . That's allow us to use join .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So try this&lt;/P&gt;&lt;P&gt;StockShortages:&lt;/P&gt;&lt;P&gt;ODBC CONNECT TO [Excel Files;DBQ=D:\Data\My Documents\Qlikview\Short Report.xls];&lt;/P&gt;&lt;P&gt;load CostCenter,&lt;BR /&gt; Period,&lt;BR /&gt; `Over/Short`,&lt;BR /&gt; `Net Sales` ;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;BR /&gt; CostCenter,&lt;BR /&gt; Period,&lt;BR /&gt; `Over/Short`,&lt;BR /&gt; `Net Sales`&lt;BR /&gt;FROM `D:\Data\My Documents\Qlikview\Short Report`.`'By Store$'`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;join (StockShortages) load&lt;/P&gt;&lt;P&gt;CostCenter, "Number of Incidents";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;a.CostCenter, a."Number of Incidents"&lt;BR /&gt;FROM RPS_Main.dbo.v_IncidentReporting a&lt;BR /&gt;WHERE a."Case Year" &amp;gt;= '2005';&lt;/P&gt;&lt;P&gt;I'm waiting for your feed-back&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jun 2010 18:20:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202889#M60431</guid>
      <dc:creator />
      <dc:date>2010-06-25T18:20:40Z</dc:date>
    </item>
    <item>
      <title>Re. :Performing a join on data loaded from SQL and Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202890#M60432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand this fully? Is the idea that you must LOAD all field names that you use in the SQL SELECT statement first? If so that seems lik a lot of replication. My sample I show is a shortened version for the purposes of saving space here, my actuall SELECT statement contains many many field names, using aliases etc.&lt;/P&gt;&lt;P&gt;I also don't understand why the "Number of Incidents" is included in the Join stmt. I want to join on the field CostCenter. My previous experience with joins is solely with SQL so perhaps I'm missing something here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jun 2010 18:47:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202890#M60432</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-25T18:47:01Z</dc:date>
    </item>
    <item>
      <title>Re. :Performing a join on data loaded from SQL and Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202891#M60433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way i've done this in the past is to load the data frm SQL into a table as you have done, then load the excel data into a table temporarily, perform a join to add the excel fields to the original SQL data, then to drop the excel data table - i've used a left join below, but you can use whichever type of join you need, this should add the excel field to the associated records in your StockShortages table... i reckon. The join is performed automatically by Qlikview as long as the two fields that you are meant to join on are named the same.. in this case CostCenter and CostCenter... if they aren't then just rename them when you load the data. Hope this helps&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;StockShortages:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ODBC CONNECT TO [Excel Files;DBQ=D:\Data\My Documents\Qlikview\Short Report.xls];&lt;BR /&gt;SQL SELECT&lt;BR /&gt; CostCenter,&lt;BR /&gt; Period,&lt;BR /&gt; `Over/Short`,&lt;BR /&gt; `Net Sales`&lt;BR /&gt;FROM `D:\Data\My Documents\Qlikview\Short Report`.`'By Store$'`;&lt;/P&gt;&lt;P&gt;TempTable:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;a.CostCenter, a."Number of Incidents"&lt;BR /&gt;FROM RPS_Main.dbo.v_IncidentReporting a&lt;BR /&gt;WHERE a."Case Year" &amp;gt;= '2005';&lt;/P&gt;&lt;P&gt;LEFT JOIN (StockShortages)&lt;/P&gt;&lt;P&gt;Load *&lt;/P&gt;&lt;P&gt;RESIDENT TempTable;&lt;/P&gt;&lt;P&gt;DROP TABLE TempTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jun 2010 23:02:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202891#M60433</guid>
      <dc:creator />
      <dc:date>2010-06-25T23:02:25Z</dc:date>
    </item>
    <item>
      <title>Re. :Performing a join on data loaded from SQL and Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202892#M60434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hey there&lt;/P&gt;&lt;P&gt;in qlikview do like this ..&lt;/P&gt;&lt;P&gt;go to the (table file) press ok select your file and load your tables ...&lt;/P&gt;&lt;P&gt;after you load file follow this sysntax&lt;/P&gt;&lt;H4&gt;join [ (tablename ) ]( loadstatement | selectstatement )&lt;/H4&gt;&lt;H4&gt;hope this will help you&lt;/H4&gt;&lt;H4&gt;Regards,&lt;/H4&gt;&lt;H4&gt;Abdalla&lt;/H4&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jun 2010 06:59:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202892#M60434</guid>
      <dc:creator />
      <dc:date>2010-06-26T06:59:42Z</dc:date>
    </item>
    <item>
      <title>Re. :Re: Re. :Performing a join on data loaded from SQL and Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202893#M60435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes , i suggest the same thing in my previous reply&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jun 2010 09:44:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202893#M60435</guid>
      <dc:creator />
      <dc:date>2010-06-26T09:44:48Z</dc:date>
    </item>
    <item>
      <title>Re. :Performing a join on data loaded from SQL and Excel</title>
      <link>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202894#M60436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much, I played with it some more and got it working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Simon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jun 2010 19:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performing-a-join-on-data-loaded-from-SQL-and-Excel/m-p/202894#M60436</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-06-29T19:09:58Z</dc:date>
    </item>
  </channel>
</rss>

