Following Code produces an empty table and I do not have any clue why this is happening!
BGRAD: LOAD Distinct // num#(PERNR) AS PERNR, PERNR, BSGRD, Num(BEGDA) AS BStart, Num(ENDDA) AS BEnd FROM [..\DATA\00-08000000-90-100-PA0008.qvd](qvd); Store [BGRAD] into [..\DATA\BGRAD.qvd](qvd); //25062 Records read
inner Join IntervalMatch (DATUM_SAP, PERNR) LOAD distinct BStart, BEnd, // num#(PERNR) AS PERNR PERNR Resident BGRAD; Store [BGRAD] into [..\DATA\BGRAD1.qvd](qvd); // 0 records read
For y=Year(Today()) to (Year(Today())+5) For m=1 to 12
CAL: LOAD MakeDate($(y),$(m),1) AS DATUM_REAL, Num(MakeDate($(y),$(m),1)) AS DATUM_SAP AutoGenerate(1); Next Next
Left Join LOAD Distinct PLANS FROM [..\DATA\00-08000000-90-100-T528T.qvd](qvd);
HRP1001: LOAD RSIGN, RELAT, BEGDA, ENDDA, SUBTY, SCLAS, SOBID, PROZT, Num(BEGDA) AS Start, Num(ENDDA) AS End, OBJID AS PLANS, OBJID FROM [..\DATA\00-08000000-90-100-HRP1001.qvd](qvd) WHERE PLVAR = $(vPLVAR) and OTYPE='S';
Inner Join IntervalMatch (DATUM_SAP, PLANS)
// matchfield:DATUM_SAP contains the discrete numeric value to be linked to intervals // keyfield: contains attribute that are to be matched in the transformation LOAD Distinct Start, End, PLANS Resident HRP1001;