Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Interval Match explodes

Hi There ( I tried this before, but the code at the bottom was poorly formatted, so here is the same post but with a better code-format),

I've got a problem with interval matching 2 tables, it keeps loading an unlimited amount of records when I run it. I'm trying to connect the table (DBC) to a table (EK) based on the following interval match:

If (BegindatumDBC) is in the interval (BegindatumEK-EinddatumEK) then connect the values (DBC)

I need to connect more values (through left joints) from that table but need to drop the EK table in the end to work around synthetic keys.... at least I think.

Still, when I run it, it keeps exploding in loading an unlimited number of records the second time it loads the (EK) table to match.

Can anybody help me out?

Thanks!!!



































DBC:



EK:



left




left join (DBC) load * Resident EK;
drop table EK; join IntervalMatch(BegindatumDBCnum) load BeginddatumEKnum, EinddatumEKnum resident EK;LOAD[DBC zonder ZV] as DBC, [DBC declaratiecode verzekerde zorg] as DeclaCode, Ingangsdatum,Afloopdatum,MAKEDATE(LEFT(Ingangsdatum,4),MID(Ingangsdatum,5, 2),RIGHT(Ingangsdatum,2)) as BegindatumEK,MAKEDATE(LEFT(Afloopdatum,4),MID(Afloopdatum,5, 2),RIGHT(Afloopdatum,2)) as EinddatumEK,num(MAKEDATE(LEFT(Ingangsdatum,4),MID(Ingangsdatum,5, 2),RIGHT(Ingangsdatum,2))) as BeginddatumEKnum,num(MAKEDATE(LEFT(Afloopdatum,4),MID(Afloopdatum,5, 2),RIGHT(Afloopdatum,2))) as EinddatumEKnumFROM (txt, codepage is 1252, embedded labels, delimiter is ';', msq, header is 2 lines);LOAD Id,Begindatum,MAKEDATE(LEFT(Begindatum,4),MID(Begindatum,5, 2),RIGHT(Begindatum,2)) as BegindatumDBC,num(MAKEDATE(LEFT(Begindatum,4),MID(Begindatum,5, 2),RIGHT(Begindatum,2))) as BegindatumDBCnum,AGB &'.'& Zorgtype &'.'& Diagnose &'.'& Behandeling as DBCFROM[..\..\DBC analyse\DBCInvoerbestandmetDBCcode.csv] (txt, codepage is 1252, embedded labels, delimiter is ';', msq);
[\code]</body>
0 Replies