<?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 Using Nested SELECT when importing data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305824#M1200830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great that you solved your issue! Happy Qliking &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Feb 2011 16:42:52 GMT</pubDate>
    <dc:creator>Bjorn_Wedbratt</dc:creator>
    <dc:date>2011-02-14T16:42:52Z</dc:date>
    <item>
      <title>Using Nested SELECT when importing data</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305818#M1200824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two SQL server tables, an Engineer table and an Incident table. I'd like to link these tables using the engineer name field.&lt;BR /&gt;&lt;BR /&gt;Is it possible in the edit script dialog to do the following&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;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL&lt;BR /&gt; SELECT ID as EngineerID, ManagerID, TeamID, EngineerName FROM Engineer;&lt;/P&gt;&lt;P&gt;SQL&lt;BR /&gt; SELECT ID as IncidentID, EngineerID,&lt;BR /&gt; (SELECT EngineerName FROM Engineer WHERE Engineer.ID = Incident.EngineerID) AS EngineerName&lt;BR /&gt;FROM Incident;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 13:09:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305818#M1200824</guid>
      <dc:creator />
      <dc:date>2011-02-14T13:09:49Z</dc:date>
    </item>
    <item>
      <title>Using Nested SELECT when importing data</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305819#M1200825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'd do something like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;EngineerIDNameMap:MAPPING LOAD ID, Name;SQL SELECT ID, Name FROM Engineer; Data:LOAD ID AS IncidentID, EngineerID, ApplyMap('EngineerIDNameMap', EngineerID) AS EngineerName; // this will return the corresponding value for the ID previously loaded in the table aboveSQL SELECT ID, EngineerID FROM Incident;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Further information can be found in the Reference Manual about mapping tables.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 13:28:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305819#M1200825</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-02-14T13:28:57Z</dc:date>
    </item>
    <item>
      <title>Using Nested SELECT when importing data</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305820#M1200826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it error when you do it?&lt;/P&gt;&lt;P&gt;Although I am not sure why you want to do it as if you loaded in :&lt;/P&gt;&lt;P&gt;SQL&lt;BR /&gt; SELECT ID as EngineerID, ManagerID, TeamID, EngineerName FROM Engineer;&lt;/P&gt;&lt;P&gt;SQL&lt;BR /&gt; SELECT ID as IncidentID, EngineerID&lt;BR /&gt;FROM Incident;&lt;/P&gt;&lt;P&gt;QV Would create the associative join on Engineer ID so you would be able to view IncidentID next to EngineerName in the front end.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 13:34:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305820#M1200826</guid>
      <dc:creator>richardcripps</dc:creator>
      <dc:date>2011-02-14T13:34:07Z</dc:date>
    </item>
    <item>
      <title>Using Nested SELECT when importing data</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305821#M1200827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had expected that QV would create the link on the EngineerID in each table. I have a sheet with a list box showing the engineer names from the engineer table.&lt;BR /&gt;&lt;BR /&gt;I also have a bar chart showing the incidents from each engineer.&lt;BR /&gt;&lt;BR /&gt;The bar chart includes a total column and this correctly shows the total number of rows as 716. But the bars for each engineer don't show the correct totals.&lt;/P&gt;&lt;P&gt;I can't figure out why and wanted to see if linking by the engineer name would make any difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 13:42:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305821#M1200827</guid>
      <dc:creator />
      <dc:date>2011-02-14T13:42:41Z</dc:date>
    </item>
    <item>
      <title>Using Nested SELECT when importing data</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305822#M1200828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If EngineerID is named &lt;I&gt;exactly&lt;/I&gt; the same in the two tables, QlikView will associate the fields into one. You can check this using the table-viewer in QV (CTRL+T), making sure there's a link between the tables on the field. However this is just the first step, QlikView will then make associations on the &lt;I&gt;exact fieldvalues.&lt;/I&gt; So if you experience that you have values in the EngineerID field from both tables, you might need to also reformat the actual data.&lt;/P&gt;&lt;P&gt;Let's say that you have EngineerID='A' in one table and EngineerID='&amp;lt;space&amp;gt;A' in the other. In this case you will see the value 'A' and '&amp;lt;space&amp;gt;A' in the listbox, hence not associated. Then you need to format the values to be exact using various script-statements.&lt;/P&gt;&lt;P&gt;If you experience that you have EngineerID='123' left-aligned in the listbox, but also '123' right-aligned it indicates that QlikView formated the left-aligned '123' as a string, and not a number. Again, the values will not be the same, hence no association, and the data needs to be number/text-formated&lt;/P&gt;&lt;P&gt;You could of course join the two tables, either in the SELECT-statement, or using JOIN between two LOAD-statements in QlikView, but normally this is not required, unless you need to re-structure your schema into a star-schema.&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Bjorn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 14:59:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305822#M1200828</guid>
      <dc:creator>Bjorn_Wedbratt</dc:creator>
      <dc:date>2011-02-14T14:59:44Z</dc:date>
    </item>
    <item>
      <title>Using Nested SELECT when importing data</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305823#M1200829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all the help...by a process of elimination I manged to figure out what was happening..and I guess if I'd have expanded on all the tables I was using you'd all have probably figure it out way before me.&lt;/P&gt;&lt;P&gt;As it happens I had a couple of other tables imported as well and I hadn't appreciated that QV had built links between these tables using another field and this was effectively executing a query on the linked tables that was reducing the dataset returned.&lt;/P&gt;&lt;P&gt;Once I stopped loading the field that was common across all the tables I was getting the correct data returned.&lt;/P&gt;&lt;P&gt;I obviously have a lot to learn about QV and thanks to all your help this morning I have learned a bit more about how QV is working.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 16:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305823#M1200829</guid>
      <dc:creator />
      <dc:date>2011-02-14T16:26:28Z</dc:date>
    </item>
    <item>
      <title>Using Nested SELECT when importing data</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305824#M1200830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great that you solved your issue! Happy Qliking &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Feb 2011 16:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Nested-SELECT-when-importing-data/m-p/305824#M1200830</guid>
      <dc:creator>Bjorn_Wedbratt</dc:creator>
      <dc:date>2011-02-14T16:42:52Z</dc:date>
    </item>
  </channel>
</rss>

