<?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 Loading a selection from a database based upon whats already loaded. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-a-selection-from-a-database-based-upon-whats-already/m-p/420326#M1160881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I have a database I wish to use to create some data associations which are only held within the DB. I am having problems using the 'where exists Clause'&amp;nbsp; as it tells me that the tables dont exist after the database loads. Here is the code I am using as an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please see attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer_Table :&lt;BR /&gt;LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BP&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;&lt;D&gt;&lt;BR /&gt;(qvd);&lt;/D&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO [Provider=Microsoft.Jet.OLEDB.4.0; etc etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mosiac_raw:&lt;BR /&gt;LOAD *,&lt;BR /&gt; LEFT([Client Reference],10) AS BP;&lt;BR /&gt;SQL SELECT `Client Reference`,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_group_alpha`,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_group_num`,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_type`&lt;BR /&gt;FROM `Water_Append_Output`&lt;BR /&gt;where exists(BP,LEFT([Client Reference],10))&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Mosaic:&lt;BR /&gt;LOAD BP,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(pc_mosaic_public_sector_type) as Type&lt;BR /&gt;Resident Mosiac_raw&lt;BR /&gt;Group By BP;&lt;/P&gt;&lt;P&gt;inner Join(Mosaic)&lt;/P&gt;&lt;P&gt; LOAD BP,&lt;BR /&gt; pc_mosaic_public_sector_type as Type,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pc_mosaic_public_sector_group_alpha &amp;amp; num(pc_mosaic_public_sector_type,'00') as Code&lt;BR /&gt;Resident Mosiac_raw;&lt;/P&gt;&lt;P&gt;drop Table Mosiac_raw;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Nov 2012 14:27:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-09T14:27:03Z</dc:date>
    <item>
      <title>Loading a selection from a database based upon whats already loaded.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-selection-from-a-database-based-upon-whats-already/m-p/420326#M1160881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello I have a database I wish to use to create some data associations which are only held within the DB. I am having problems using the 'where exists Clause'&amp;nbsp; as it tells me that the tables dont exist after the database loads. Here is the code I am using as an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please see attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Customer_Table :&lt;BR /&gt;LOAD &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BP&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM&lt;BR /&gt;&lt;D&gt;&lt;BR /&gt;(qvd);&lt;/D&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OLEDB CONNECT32 TO [Provider=Microsoft.Jet.OLEDB.4.0; etc etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mosiac_raw:&lt;BR /&gt;LOAD *,&lt;BR /&gt; LEFT([Client Reference],10) AS BP;&lt;BR /&gt;SQL SELECT `Client Reference`,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_group_alpha`,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_group_num`,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_type`&lt;BR /&gt;FROM `Water_Append_Output`&lt;BR /&gt;where exists(BP,LEFT([Client Reference],10))&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;Mosaic:&lt;BR /&gt;LOAD BP,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(pc_mosaic_public_sector_type) as Type&lt;BR /&gt;Resident Mosiac_raw&lt;BR /&gt;Group By BP;&lt;/P&gt;&lt;P&gt;inner Join(Mosaic)&lt;/P&gt;&lt;P&gt; LOAD BP,&lt;BR /&gt; pc_mosaic_public_sector_type as Type,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pc_mosaic_public_sector_group_alpha &amp;amp; num(pc_mosaic_public_sector_type,'00') as Code&lt;BR /&gt;Resident Mosiac_raw;&lt;/P&gt;&lt;P&gt;drop Table Mosiac_raw;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 14:27:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-selection-from-a-database-based-upon-whats-already/m-p/420326#M1160881</guid>
      <dc:creator />
      <dc:date>2012-11-09T14:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a selection from a database based upon whats already loaded.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-selection-from-a-database-based-upon-whats-already/m-p/420327#M1160882</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;Your Where Exists is in the SQL section of the script, which is processed by the Jet driver. This is not a valid SQL command that Jet recognises, hence the failure. Try this instead:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;Mosiac_raw:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;LOAD *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;LEFT([Client Reference],10) AS BP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; background-color: #ffffff; font-family: Arial;"&gt;where exists(BP,LEFT([Client Reference],10))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;SQL SELECT `Client Reference`,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_group_alpha`,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_group_num`,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; `pc_mosaic_public_sector_type`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;FROM `Water_Append_Output`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 14:34:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-selection-from-a-database-based-upon-whats-already/m-p/420327#M1160882</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2012-11-09T14:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a selection from a database based upon whats already loaded.</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-selection-from-a-database-based-upon-whats-already/m-p/420328#M1160883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; can you try to run the script without the creation of the table "Mosaic" and check if the table "Mosaic_raw" is correct?&lt;/P&gt;&lt;P&gt;You could have an error on "Mosaic_raw" that leads your error on "Mosaic"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Daniele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2012 17:26:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-selection-from-a-database-based-upon-whats-already/m-p/420328#M1160883</guid>
      <dc:creator />
      <dc:date>2012-11-09T17:26:58Z</dc:date>
    </item>
  </channel>
</rss>

