<?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 Passing the values from one table to another table in Qlik Scripting in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Passing-the-values-from-one-table-to-another-table-in-Qlik/m-p/1590892#M43383</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Warm greetings!..&lt;/P&gt;&lt;P&gt;Need help on converting the given sub-queries to Qlik where we are passing the values on EFF_DT and Revision_Num fields from one table to another table.&lt;/P&gt;&lt;P&gt;We need to get the Office and team details using below queries.&lt;/P&gt;&lt;P&gt;Below are the two challenges we are facing to implement in Qlik:&lt;/P&gt;&lt;P&gt;1. Pass the value of "Last Work Date" from "Report" table to "EFF_DT" in "Revision" table as given in below Query1.&lt;/P&gt;&lt;P&gt;2. Pass the Revision_Num value from Query1 to next Query2 as&amp;nbsp;Revision_Num &lt;FONT color="#008000"&gt;&lt;STRONG&gt;&amp;lt;= (Query1 Value)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Query:1&lt;/P&gt;&lt;P&gt;SELECT A.Revision_Num&lt;BR /&gt;FROM Revision A&lt;BR /&gt;WHERE A.Report_Num = 315905&lt;BR /&gt;AND A.Coverage_Code = '8200'&lt;BR /&gt;AND A.Plan_Code = '000'&lt;BR /&gt;AND A.Revision_Num = (SELECT MAX(B.Revision_Num)&lt;BR /&gt;FROM Revision B&lt;BR /&gt;WHERE B.Report_Num = 315905&lt;BR /&gt;AND B.Coverage_Code = '8200'&lt;BR /&gt;AND B.Plan_Code = '000'&lt;BR /&gt;AND B.Dept_Type ¬= 'C'&lt;BR /&gt;&lt;STRONG&gt;AND B.EFF_DT &amp;lt;= DATE('1/1/2019')&lt;/STRONG&gt; -- &lt;FONT color="#008000"&gt;&lt;STRONG&gt;(Last work date from Report Table)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;AND NOT EXISTS (&lt;BR /&gt;SELECT 1&lt;BR /&gt;FROM Revision C&lt;BR /&gt;WHERE C.RPL_TS = B.UPDT_TS ))&lt;/P&gt;&lt;P&gt;As output, will get Revision_Num from above Query1 and then we need to pass the same value in below Query2 to another Team table.&amp;nbsp; --&lt;STRONG&gt;&lt;FONT color="#008000"&gt;Query1_Value (&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Query2:.&lt;/P&gt;&lt;P&gt;SELECT&lt;BR /&gt;Team,A.Office&lt;BR /&gt;FROM Team A&lt;BR /&gt;WHERE A.Report_Num =&amp;nbsp;315905&lt;BR /&gt;AND A.Coverage_Code = '8200'&lt;BR /&gt;AND A.Plan_Code = '000'&lt;BR /&gt;AND A.Sub_Code = '0001'&lt;BR /&gt;AND A.SubPoint_Code = '0001'&lt;BR /&gt;AND Revision_Num &amp;lt;= &lt;STRONG&gt;&lt;FONT color="#008000"&gt;Query1_Value &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;AND NOT EXISTS (&lt;BR /&gt;SELECT 1&lt;BR /&gt;FROM Team B&lt;BR /&gt;WHERE B.Revision_Num &amp;lt;= &lt;FONT color="#008000"&gt;&lt;STRONG&gt;Query1_Value&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;--Revision_Num from Query1&lt;/FONT&gt; &lt;/STRONG&gt;&lt;BR /&gt;AND A.UPDT_TS = B.RPL_TS )&lt;/P&gt;&lt;P&gt;Attaching the sample data for Report and Revision table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if any other details are required to solve this.&lt;/P&gt;&lt;P&gt;Our Solution: we don’t find an easy way in Qlik on converting the query logic other than iteratively executing the query.&lt;BR /&gt;But this iteration method takes hours to finish, so we cannot go with this approach either.&lt;/P&gt;&lt;P&gt;So requesting your help on converting the same sub query logic to pass the values in Qlik tables considering the run time and performance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmashini&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2019 10:45:27 GMT</pubDate>
    <dc:creator>padmashini_rama</dc:creator>
    <dc:date>2019-06-12T10:45:27Z</dc:date>
    <item>
      <title>Passing the values from one table to another table in Qlik Scripting</title>
      <link>https://community.qlik.com/t5/App-Development/Passing-the-values-from-one-table-to-another-table-in-Qlik/m-p/1590892#M43383</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Warm greetings!..&lt;/P&gt;&lt;P&gt;Need help on converting the given sub-queries to Qlik where we are passing the values on EFF_DT and Revision_Num fields from one table to another table.&lt;/P&gt;&lt;P&gt;We need to get the Office and team details using below queries.&lt;/P&gt;&lt;P&gt;Below are the two challenges we are facing to implement in Qlik:&lt;/P&gt;&lt;P&gt;1. Pass the value of "Last Work Date" from "Report" table to "EFF_DT" in "Revision" table as given in below Query1.&lt;/P&gt;&lt;P&gt;2. Pass the Revision_Num value from Query1 to next Query2 as&amp;nbsp;Revision_Num &lt;FONT color="#008000"&gt;&lt;STRONG&gt;&amp;lt;= (Query1 Value)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Query:1&lt;/P&gt;&lt;P&gt;SELECT A.Revision_Num&lt;BR /&gt;FROM Revision A&lt;BR /&gt;WHERE A.Report_Num = 315905&lt;BR /&gt;AND A.Coverage_Code = '8200'&lt;BR /&gt;AND A.Plan_Code = '000'&lt;BR /&gt;AND A.Revision_Num = (SELECT MAX(B.Revision_Num)&lt;BR /&gt;FROM Revision B&lt;BR /&gt;WHERE B.Report_Num = 315905&lt;BR /&gt;AND B.Coverage_Code = '8200'&lt;BR /&gt;AND B.Plan_Code = '000'&lt;BR /&gt;AND B.Dept_Type ¬= 'C'&lt;BR /&gt;&lt;STRONG&gt;AND B.EFF_DT &amp;lt;= DATE('1/1/2019')&lt;/STRONG&gt; -- &lt;FONT color="#008000"&gt;&lt;STRONG&gt;(Last work date from Report Table)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;AND NOT EXISTS (&lt;BR /&gt;SELECT 1&lt;BR /&gt;FROM Revision C&lt;BR /&gt;WHERE C.RPL_TS = B.UPDT_TS ))&lt;/P&gt;&lt;P&gt;As output, will get Revision_Num from above Query1 and then we need to pass the same value in below Query2 to another Team table.&amp;nbsp; --&lt;STRONG&gt;&lt;FONT color="#008000"&gt;Query1_Value (&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Query2:.&lt;/P&gt;&lt;P&gt;SELECT&lt;BR /&gt;Team,A.Office&lt;BR /&gt;FROM Team A&lt;BR /&gt;WHERE A.Report_Num =&amp;nbsp;315905&lt;BR /&gt;AND A.Coverage_Code = '8200'&lt;BR /&gt;AND A.Plan_Code = '000'&lt;BR /&gt;AND A.Sub_Code = '0001'&lt;BR /&gt;AND A.SubPoint_Code = '0001'&lt;BR /&gt;AND Revision_Num &amp;lt;= &lt;STRONG&gt;&lt;FONT color="#008000"&gt;Query1_Value &lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;AND NOT EXISTS (&lt;BR /&gt;SELECT 1&lt;BR /&gt;FROM Team B&lt;BR /&gt;WHERE B.Revision_Num &amp;lt;= &lt;FONT color="#008000"&gt;&lt;STRONG&gt;Query1_Value&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;--Revision_Num from Query1&lt;/FONT&gt; &lt;/STRONG&gt;&lt;BR /&gt;AND A.UPDT_TS = B.RPL_TS )&lt;/P&gt;&lt;P&gt;Attaching the sample data for Report and Revision table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if any other details are required to solve this.&lt;/P&gt;&lt;P&gt;Our Solution: we don’t find an easy way in Qlik on converting the query logic other than iteratively executing the query.&lt;BR /&gt;But this iteration method takes hours to finish, so we cannot go with this approach either.&lt;/P&gt;&lt;P&gt;So requesting your help on converting the same sub query logic to pass the values in Qlik tables considering the run time and performance.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Padmashini&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 10:45:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Passing-the-values-from-one-table-to-another-table-in-Qlik/m-p/1590892#M43383</guid>
      <dc:creator>padmashini_rama</dc:creator>
      <dc:date>2019-06-12T10:45:27Z</dc:date>
    </item>
  </channel>
</rss>

