<?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: Use field to select from database in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32036#M773094</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Olivier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works like a charm!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 May 2018 07:55:18 GMT</pubDate>
    <dc:creator>marcusbohman</dc:creator>
    <dc:date>2018-05-15T07:55:18Z</dc:date>
    <item>
      <title>Use field to select from database</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32033#M773091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am selecting PART_ID from a cross reference table with a where clause on PART_NUMBER as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parts:&lt;/P&gt;&lt;P&gt;LOAD*;&lt;/P&gt;&lt;P&gt;SQL SELECT "PART_ID"&lt;/P&gt;&lt;P&gt;FROM "DATABASE1" where PART_NUMBER IN ('84171490','84017929','9519027','9998266');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to use the PART_IDs in another where clause similar to below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT "PART_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INFO1",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INFO2"&lt;/P&gt;&lt;P&gt;FROM "DATABASE2" where IN (Parts.PART_ID);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried a LEFT JOIN but DATABASE2 is to big for me to select everything and then join it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32033#M773091</guid>
      <dc:creator>marcusbohman</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use field to select from database</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32034#M773092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;why don't you try a single sql select like&amp;nbsp; (syntax may not be correct depending on your base):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT "PART_ID",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INFO1",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INFO2"&lt;/P&gt;&lt;P&gt;FROM "DATABASE2" join "DATABASE1"&lt;/P&gt;&lt;P&gt;on "DATABASE2"."PART_ID"="DATABASE1"."PART_ID"&lt;/P&gt;&lt;P&gt;and&amp;nbsp; PART_NUMBER IN ('84171490','84017929','9519027','9998266');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so that the database is working and QV gets only the rows you need&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 07:41:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32034#M773092</guid>
      <dc:creator>olivierrobin</dc:creator>
      <dc:date>2018-05-15T07:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: Use field to select from database</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32035#M773093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can combine the two Selects in a SQL JOIN so that the limited set of rows from table1 is joined with only relevant details from Table2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A QlikView alternative consists of first storing the list of relevant PART_ID values in a variable and then use that variable in each WHERE clause. For example, something like this (off the top of my head, some tuning may be required):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Parts:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT "PART_ID"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM "DATABASE1" where PART_NUMBER IN ('84171490','84017929','9519027','9998266');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;PartsList:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD Concat(chr(39) &amp;amp; PART_ID &amp;amp; chr(39), ', ') AS PartsList RESIDENT Parts;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vPartsList = peek('PartsList');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;DROP Table PartsList;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SQL SELECT "PART_ID",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INFO1",&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "INFO2"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM "DATABASE2" WHERE PART_ID IN ($(vPartsList));&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Best,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 07:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32035#M773093</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2018-05-15T07:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Use field to select from database</title>
      <link>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32036#M773094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Olivier,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Works like a charm!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2018 07:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-field-to-select-from-database/m-p/32036#M773094</guid>
      <dc:creator>marcusbohman</dc:creator>
      <dc:date>2018-05-15T07:55:18Z</dc:date>
    </item>
  </channel>
</rss>

