Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
///////////// Interval Match ////////////////////////
// this works **************************
BranchDim:
LOAD
text(RetailOrgDimId) & '|' & EffectiveDate & '|' & EndDate as %BranchInterval,
Text(RetailOrgDimId) as RetailOrgDimId,
EffectiveDate as BranchEffDate,
EndDate as BranchEndDate
From BranchProd.qvd (qvd)
Where Exists(RetailOrgDimId,Text(RetailOrgDimId));
BranchIntervalMatch:
IntervalMatch(%CDATE, RetailOrgDimId) // NOTE: table FA_Stats (L-Join below) contains fields %CDATE & RetailOrgDimId
Load
BranchEffDate,
BranchEndDate,
RetailOrgDimId
Resident BranchDim;
Left Join (FA_Stats)
Load
%CDATE,
RetailOrgDimId,
text(RetailOrgDimId) & '|' & BranchEffDate & '|' & BranchEndDate as %BranchInterval
Resident BranchIntervalMatch;
///////////// Interval Match ////////////////////////
// this FAILS *************************
ManagedDiscHist:
NoConcatenate
Load
DISTINCT
Text(AccountID) as AccountID,
AcctHistEffDate,
AcctHistEndDate
From AccountProd.qvd(qvd)
Where Exists(AccountID,Text(AccountID));
AcctIntervalMatch: // here I load ZERO rows of data **************************
intervalmatch (%CDATE,AccountID) // NOTE: table aCCOUNTS (L-Join below) contains field AccountID
Load
load AcctHistEffDate,
AcctHistEndDate,
AccountID
Resident ManagedDiscHist;
Left join (Accounts)
Load
AccountID,
AcctHistEffDate,
AcctHistEndDate,
...
Resident ManagedDiscHist;
The script below the 'FAIL' section is executed after '//This works' section, or you are trying to show that bottom approach is not working?
If bottom part is independent of the section that works for you than I would ask if you have loaded the table having %CDATE field or not before executing interval match statement?
What is your question?