<?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: Script Key between tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668039#M728432</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6678"&gt;@Arthur_Fong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for this, it seems it is exactly what I was looking for. But there is some error on the Intervalmatch load statement.&lt;/P&gt;&lt;P&gt;I managed to make that work changing the last part of your code, it works, but it produces a Shyntetic Key.&lt;/P&gt;&lt;P&gt;Inner Join IntervalMatch (Date,Telephone)&lt;BR /&gt;load&lt;BR /&gt;Campaing_start_date,&lt;BR /&gt;Campaing_end_date,&lt;BR /&gt;Telephone&lt;BR /&gt;Resident Telephone_table;&lt;BR /&gt;EXIT script;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2020 09:40:31 GMT</pubDate>
    <dc:creator>Adamo</dc:creator>
    <dc:date>2020-01-22T09:40:31Z</dc:date>
    <item>
      <title>Script Key between tables</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1667781#M728430</link>
      <description>&lt;P&gt;I have two tables on the Script:&lt;/P&gt;&lt;P&gt;Telehone_table:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Telephone,&lt;/P&gt;&lt;P&gt;Campaing_code,&lt;/P&gt;&lt;P&gt;Campaing_descrip,&lt;/P&gt;&lt;P&gt;Campaing_start_date,&lt;/P&gt;&lt;P&gt;Campaing_end_date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Telephones_records:&lt;/P&gt;&lt;P&gt;Telephone,&lt;/P&gt;&lt;P&gt;Date,&lt;/P&gt;&lt;P&gt;Calls,&lt;/P&gt;&lt;P&gt;Sales&lt;/P&gt;&lt;P&gt;The most obvious will be to do&amp;nbsp; use Telephone as KEY but&amp;nbsp; the problem here is that Telephones are reused over time for new campaings, so there is a list of about 50 telephones whereas they are reused for Campaings over time. How to link those tables by a convination of Telephone, Campaing_start_date and&amp;nbsp;Campaing_end_date?&lt;/P&gt;&lt;P&gt;Here is a small sample of each table&lt;/P&gt;&lt;P&gt;Telephone_table:&lt;/P&gt;&lt;P&gt;Telephone,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Campaing_code,&amp;nbsp; &amp;nbsp; &amp;nbsp; Campaing_descrip,&amp;nbsp; &amp;nbsp; &amp;nbsp;Campaing_start_date,&amp;nbsp; &amp;nbsp; &amp;nbsp;Campaing_end_date&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1001 (*)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Campaing1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 01/01/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15/01/2019&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;002&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Campaing2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 16/01/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;23/01/2019&lt;/P&gt;&lt;P&gt;.....&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;......&lt;/P&gt;&lt;P&gt;Note (*): Watch that the same telephone number 1001 is reused for Campaing1 and Campaing2&lt;/P&gt;&lt;P&gt;Telephone_records:&lt;/P&gt;&lt;P&gt;Telephone,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Date,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Calls,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Sales&lt;/P&gt;&lt;P&gt;1001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;01/01/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 20&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&lt;/P&gt;&lt;P&gt;1001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;02/01/2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6&lt;/P&gt;&lt;P&gt;.....&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .....&lt;/P&gt;&lt;P&gt;Thanks in advance!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:27:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1667781#M728430</guid>
      <dc:creator>Adamo</dc:creator>
      <dc:date>2024-11-16T01:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Script Key between tables</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1667934#M728431</link>
      <description>&lt;P&gt;Try intervalmatch:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Telephone_records:
load Telephone,DATE#(Date,'DD/MM/YYYY')AS Date,Calls,Sales inline [
Telephone,Date,Calls,Sales
1001,01/01/2019,20,3
1001,02/01/2019,25,6
];

Telephone_table:
load Telephone,Campaing_code,Campaing_descrip,date#(Campaing_start_date,'DD/MM/YYYY') AS Campaing_start_date,DATE#(Campaing_end_date,'DD/MM/YYYY')AS Campaing_end_date inline [
Telephone,Campaing_code,Campaing_descrip,Campaing_start_date,Campaing_end_date
1001(*),001,Campaing1,01/01/2019,15/01/2019
1001,002,Campaing2,16/01/2019,23/01/2019
];

inner join
IntervalMatch(Telephone,Date)
load Telephone,Campaing_start_date,Campaing_end_date
Resident Telephone_table;
EXIT script;&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Jan 2020 01:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1667934#M728431</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-01-22T01:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Script Key between tables</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668039#M728432</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6678"&gt;@Arthur_Fong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for this, it seems it is exactly what I was looking for. But there is some error on the Intervalmatch load statement.&lt;/P&gt;&lt;P&gt;I managed to make that work changing the last part of your code, it works, but it produces a Shyntetic Key.&lt;/P&gt;&lt;P&gt;Inner Join IntervalMatch (Date,Telephone)&lt;BR /&gt;load&lt;BR /&gt;Campaing_start_date,&lt;BR /&gt;Campaing_end_date,&lt;BR /&gt;Telephone&lt;BR /&gt;Resident Telephone_table;&lt;BR /&gt;EXIT script;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2020 09:40:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668039#M728432</guid>
      <dc:creator>Adamo</dc:creator>
      <dc:date>2020-01-22T09:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Script Key between tables</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668324#M728433</link>
      <description>&lt;P&gt;Try adding a left join below the intervalmatch statement:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Inner Join IntervalMatch (Date,Telephone)
load
Campaing_start_date,
Campaing_end_date,
Telephone
Resident Telephone_table;

left join(Telephone_records)
load * resident Telephone_table;

drop table Telephone_table;

EXIT script;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 01:30:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668324#M728433</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-01-23T01:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Script Key between tables</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668456#M728434</link>
      <description>&lt;P&gt;Still produces a Synthetic Key&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="synthetic key.jpg" style="width: 900px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/27325i3BADA319042CE9EB/image-size/large?v=v2&amp;amp;px=999" role="button" title="synthetic key.jpg" alt="synthetic key.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Telephone_records:
load
Telephone,
DATE#(Date,'DD/MM/YYYY')AS Date,
Calls,
Sales
inline [
Telephone,Date,Calls,Sales
1001,01/01/2019,20,3
1001,02/01/2019,25,6
];

Telephone_table:
load 
Telephone,
Campaing_code,
Campaing_descrip,
date#(Campaing_start_date,'DD/MM/YYYY') AS Campaing_start_date,
DATE#(Campaing_end_date,'DD/MM/YYYY')AS Campaing_end_date 
inline [
Telephone,Campaing_code,Campaing_descrip,Campaing_start_date,Campaing_end_date
1001,001,Campaing1,01/01/2019,15/01/2019
1001,002,Campaing2,16/01/2019,23/01/2019
];

Inner Join IntervalMatch (Date,Telephone)
load 
Campaing_start_date,
Campaing_end_date,
Telephone
Resident Telephone_table;
EXIT script;


left join(Telephone_records)
load * resident Telephone_table;

drop table Telephone_table;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 23 Jan 2020 12:07:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668456#M728434</guid>
      <dc:creator>Adamo</dc:creator>
      <dc:date>2020-01-23T12:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: Script Key between tables</title>
      <link>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668457#M728435</link>
      <description>&lt;P&gt;Remove exit script will do.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 12:09:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Script-Key-between-tables/m-p/1668457#M728435</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2020-01-23T12:09:43Z</dc:date>
    </item>
  </channel>
</rss>

