<?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: how can i update a field in main table matching multiple columns with secondary tables? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-can-i-update-a-field-in-main-table-matching-multiple-columns/m-p/107303#M758786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this -&lt;/P&gt;&lt;P&gt;You can drop the extra fields at the end of the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Sep 2018 20:03:12 GMT</pubDate>
    <dc:creator>neelamsaroha157</dc:creator>
    <dc:date>2018-09-07T20:03:12Z</dc:date>
    <item>
      <title>how can i update a field in main table matching multiple columns with secondary tables?</title>
      <link>https://community.qlik.com/t5/QlikView/how-can-i-update-a-field-in-main-table-matching-multiple-columns/m-p/107302#M758785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need help on the below case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my primary data consists of around 29 fields and about 500K rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For simplicity i have created an example inline table with only 4 columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mainData:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [Status, Country, Location, Result&lt;/P&gt;&lt;P&gt;Active, USA, Area1, N/A&lt;/P&gt;&lt;P&gt;Inactive, USA, Area2, N/A&lt;/P&gt;&lt;P&gt;Inactive, Canada, Area1, N/A&lt;/P&gt;&lt;P&gt;Active, Canada, Area2, N/A&lt;/P&gt;&lt;P&gt;Unknown, Italy, Area3, N/A&lt;/P&gt;&lt;P&gt;Active, Germany, Area5, N/A&lt;/P&gt;&lt;P&gt;Active, Germany, Area2, N/A&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have&amp;nbsp; many additional tables that have 4 or less columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;modifyData1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [newStatus, newCountry, newLocation, newResult&lt;/P&gt;&lt;P&gt;Active, USA, Area1, Good&lt;/P&gt;&lt;P&gt;Active, USA, Area2, Bad&lt;/P&gt;&lt;P&gt;Active Canada, Area2, Average&lt;/P&gt;&lt;P&gt;Active, Germany Area2, Excellent&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(i might have another modifyData2 table where newstatus=Inactive and so on)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to update the mainData table such that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if newstatus=Status AND NewCountry=Country AND newLocation=Location then&lt;/P&gt;&lt;P&gt;replace the N/A value with the newResult value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So after running the update my original data should look like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Active, USA, Area1, &lt;STRONG&gt;Good&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Inactive, USA, Area2, N/A&lt;/P&gt;&lt;P&gt;Inactive, Canada, Area1, N/A&lt;/P&gt;&lt;P&gt;Active, Canada, Area2, &lt;STRONG&gt;Average&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Unknown, Italy, Area3, N/A&lt;/P&gt;&lt;P&gt;Active, Germany, Area5, N/A&lt;/P&gt;&lt;P&gt;Active, Germany, Area2, &lt;STRONG&gt;Excellent&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(note that not necesseraly all values of modifyData1 and mainData should match)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the closes i got to this idea was mapping table and applymap but i need to match multiple fields to make the change.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is greatly appreciated&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you all&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/how-can-i-update-a-field-in-main-table-matching-multiple-columns/m-p/107302#M758785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: how can i update a field in main table matching multiple columns with secondary tables?</title>
      <link>https://community.qlik.com/t5/QlikView/how-can-i-update-a-field-in-main-table-matching-multiple-columns/m-p/107303#M758786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this -&lt;/P&gt;&lt;P&gt;You can drop the extra fields at the end of the script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 20:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-can-i-update-a-field-in-main-table-matching-multiple-columns/m-p/107303#M758786</guid>
      <dc:creator>neelamsaroha157</dc:creator>
      <dc:date>2018-09-07T20:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: how can i update a field in main table matching multiple columns with secondary tables?</title>
      <link>https://community.qlik.com/t5/QlikView/how-can-i-update-a-field-in-main-table-matching-multiple-columns/m-p/107304#M758787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm searching for a solution that does not modify the structure of the mainData table(mainData --&amp;gt; tmainData-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Note: that my actual mainData is around 29 fields and each modifyData i have will change a specific field)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because i have around 15 modifydata tables that have to modify some field in the mainData - trying to manage all that will be a nightmare. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i copy the data of the tmainData1 to mainData keeping the original fields Status, Country, Location and replace the result field with the finalResult&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or is there a way to keep mainData intact and just loop through the modifydata rows and update mainData(result field)&amp;nbsp; accordingly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;again thank you again&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take care&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Sep 2018 03:48:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-can-i-update-a-field-in-main-table-matching-multiple-columns/m-p/107304#M758787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-09-08T03:48:10Z</dc:date>
    </item>
  </channel>
</rss>

