Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
chrisk44
Contributor III
Contributor III

Joining tables

Hello, i got problem with joining tables depend on period.

TAB1:

DATE_FROMDATE_TOKEYPERIOD_IDEMPL_NO
02.01.199631.12.20062385#350661706452385
02.01.199631.12.20062385#350661724402385
02.01.199631.12.20062385#350661787472385
16.07.200831.01.20102385#396452060952385
16.07.200831.01.20102385#396452134182385
30.11.2018 2385#434342603212385
30.11.2018 2385#434342612842385

 

TAB2:

DATE_FROMDATE_TOKEYPERIOD_IDEMPL_NO
01.01.200731.12.20072385#ZEWN1785992385
01.04.200730.04.20072385#ZEWN1782992385
01.01.200931.12.20092385#ZEWN1783002385

 

DESTINATION_TAB:

DATE_FROMDATE_TOKEYPERIOD_IDEMPL_NO
02.01.199631.12.20062385#350661706452385
02.01.199631.12.20062385#350661724402385
02.01.199631.12.20062385#350661787472385
16.07.200831.01.20102385#396452060952385
16.07.200831.01.20102385#396452134182385
30.11.2018 2385#434342603212385
30.11.2018 2385#434342612842385
01.01.200731.12.20072385#ZEWN1785992385
01.04.200730.04.20072385#ZEWN1782992385
01.01.200931.12.20092385#396451783002385

 

In TAB1 and TAB2 I got series of periods which correspond with KEY and EMPL_NO, tables should be join when period from TAB2 is included in any periods in TAB1, KEY should be taken from TAB1, when period from TAB2 not exist in TAB1 KEY should be taken from TAB2 - how can I get this table join ??

Regards

1 Solution

Accepted Solutions
chrisk44
Contributor III
Contributor III
Author

thanks for replay, finally i've got another solution (temporary table with additional Key  and compare date with period)

 

Regards

View solution in original post

3 Replies
chrisk44
Contributor III
Contributor III
Author

I found INTERVALMATCH prefix - and maybe this prefix can be used... But i'm new to qlikview and don't know how to exactly use it in above example... 

Brett_Bleess
Former Employee
Former Employee

Here are some Design Blog posts that may help you out!

https://community.qlik.com/t5/Qlik-Design-Blog/Using-IntervalMatch/ba-p/1475510

https://community.qlik.com/t5/Qlik-Design-Blog/IntervalMatch/ba-p/1464547

I know this one can be tricky, the last time I had to use it, took me a bit to get everything sorted out, so hopefully these may help you get your problem solved.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
chrisk44
Contributor III
Contributor III
Author

thanks for replay, finally i've got another solution (temporary table with additional Key  and compare date with period)

 

Regards