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=' '));