Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Jim_Wynn
Contributor
Contributor

Interval Match troubleshooting

///////////// 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;

2 Replies
Digvijay_Singh

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? 

MarcoWedel

What is your question?