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: 
Not applicable

Intervalmatch - adding field

Hi all,

I have the following script that's working fine. The tables are loaded via ODBC connection.

The issue is: in order to add two fields (in bold red) I have to load twice the table. The first time is needed in order to find the correct interval for the DATA_EMISSIONE field. The second load is needed in order to load the 2 fields I am looking for.

Does someone have a smarter/quicker way of doing this? Can I do it in just one load?

Thanks!

[MAIN]:
NULLASVALUE DATA_DECORRENZA_ALQ, DATA_SCADENZA_ALQ;
INTERVALMATCH(DATA_EMISSIONE, NUMCIE, CODICE_GARANZIA)
LOAD DATA_DECORRENZA_ALQ, DATA_SCADENZA_ALQ, NUMCIE, CODICE_GARANZIA where exists(NUMCIE);
SELECT
AL1.NUMCIE,
AL1.GARANT AS CODICE_GARANZIA,
AL1.DATEFF AS DATA_DECORRENZA_ALQ,
AL1.DATCLO AS DATA_SCADENZA_ALQ,
AL1.TAUCOU AS PROVVIGIONE_ALQ,
AL1.TAURAP AS EFFICIENCY_ALQ
FROM
DWH.S26_CARRIER_RATE AL1 WHERE ((NOT AL1.NUMCIE='      '));


left join load * where exists(NUMCIE);
SELECT
AL1.NUMCIE,
AL1.GARANT AS CODICE_GARANZIA,
AL1.DATEFF AS DATA_DECORRENZA_ALQ,
AL1.DATCLO AS DATA_SCADENZA_ALQ,
AL1.TAUCOU AS PROVVIGIONE_ALQ,
AL1.TAURAP AS EFFICIENCY_ALQ
FROM
DWH.S26_CARRIER_RATE AL1 WHERE ((NOT AL1.NUMCIE='      '));

0 Replies