<?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 if condition fields from 2 tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640223#M677775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have an if condition that contains fields from 2 different tables so I tried to concatenate the tables and when run, I received error message saying the field is not found. This is my current script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INVENT:&lt;/P&gt;&lt;P&gt;LOAD *, IF(INVENTLOCATION='BTSTORE',REORDERPOINT) AS 'ROP(BT)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.(OTHER FIELDS)&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ORDERQTY&lt;/P&gt;&lt;P&gt;INVENTLOCATION&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;FROM &amp;lt;FILENAME&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE(INVENT)&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;REORDERPOINT&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;FROM &amp;lt;FILENAME&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want to create a column that reads from 2 tables.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jun 2014 03:20:02 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-06-05T03:20:02Z</dc:date>
    <item>
      <title>if condition fields from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640223#M677775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have an if condition that contains fields from 2 different tables so I tried to concatenate the tables and when run, I received error message saying the field is not found. This is my current script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INVENT:&lt;/P&gt;&lt;P&gt;LOAD *, IF(INVENTLOCATION='BTSTORE',REORDERPOINT) AS 'ROP(BT)';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.(OTHER FIELDS)&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;ORDERQTY&lt;/P&gt;&lt;P&gt;INVENTLOCATION&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;FROM &amp;lt;FILENAME&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE(INVENT)&lt;/P&gt;&lt;P&gt;SQL SELECT&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;REORDERPOINT&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;FROM &amp;lt;FILENAME&amp;gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I want to create a column that reads from 2 tables.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 03:20:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640223#M677775</guid>
      <dc:creator />
      <dc:date>2014-06-05T03:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: if condition fields from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640224#M677776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Rachel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not the meaning of the concatenate. To reference a field in the load command, it must exist in a precedeing load (in your case, the SQL SELECT) or it must exist in the file you are loading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case, you can make a join of the two source tables, before the load or you load both tables, join them in load/join commands end only then you make the load of the INVENT table referencing the fields you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 03:40:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640224#M677776</guid>
      <dc:creator>eduardo_sommer</dc:creator>
      <dc:date>2014-06-05T03:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: if condition fields from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640225#M677777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Tab1:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.(OTHER FIELDS)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ORDERQTY&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;INVENTLOCATION&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM &amp;lt;FILENAME&amp;gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;concatenate&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;fieldnames;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;SQL SELECT&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;REORDERPOINT&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;.&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FROM &amp;lt;FILENAME&amp;gt;;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;noconcatenate&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Final:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load *,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; IF(INVENTLOCATION='BTSTORE',REORDERPOINT) AS 'ROP(BT)';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; resident Tab1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 03:55:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640225#M677777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-05T03:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: if condition fields from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640226#M677778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rachel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can do something like in your script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;From TB1;&lt;/P&gt;&lt;P&gt;Join&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM TB2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New_Table:&lt;/P&gt;&lt;P&gt;Load * , (IF(INVENTLOCATION='BTSTORE',RECORDPOINT ) AS 'POP(BT)'&lt;/P&gt;&lt;P&gt;RESIDENT Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Rajendra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 04:00:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640226#M677778</guid>
      <dc:creator />
      <dc:date>2014-06-05T04:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: if condition fields from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640227#M677779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nitin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to me that you'll never have the fields INVENTLOCATION and REORDERPOINT on the same row. If this is true, the field [ROP(BT)] will always have a null content.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this reason, I proposed a join between the two source tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 04:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640227#M677779</guid>
      <dc:creator>eduardo_sommer</dc:creator>
      <dc:date>2014-06-05T04:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: if condition fields from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640228#M677780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think this will work, as soon as you have joining fields in bothe tables (TB1 and TB2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eduardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 04:07:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640228#M677780</guid>
      <dc:creator>eduardo_sommer</dc:creator>
      <dc:date>2014-06-05T04:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: if condition fields from 2 tables</title>
      <link>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640229#M677781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes to solve this type problems we must join the table but need to remember join should be used appropriate according to data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jun 2014 04:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-condition-fields-from-2-tables/m-p/640229#M677781</guid>
      <dc:creator />
      <dc:date>2014-06-05T04:54:49Z</dc:date>
    </item>
  </channel>
</rss>

