Focal Point
[SOLVED] missing on not working

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/929102682

November 06, 2009, 10:24 AM
SG
[SOLVED] missing on not working
Hello All,
I have a requirement to count number of header records and number of detail records.
my compute statement includes both header and detail records.
I am adding all detail records but when detail record is missing I want to add one.
why is it not working?
Below code is not adding one when details record is missing. It is adding one when I change my join to "UNIQUE".

JOIN
LEFT_OUTER HEADER.HEADER.MASTER_KEY IN HEADER TO MULTIPLE DETAILS.DETAILS.MASTER_KEY IN DETAILS
AS J0
END
TABLE FILE HEADER
SUM
CNT.HEADER.HEADER.MASTER_KEY AS 'HEADCNT'
COMPUTE DETCNT/I5 = IF DETAILS.DETAILS.MASTER_KEY IS MISSING THEN 1 ELSE CNT.DETAILS.DETAILS.MASTER_KEY; AS 'DETCNT';
BY REGION
END

Any help, I would appreciate.

Thanks,
SG.

This message has been edited. Last edited by: Kerry,


Webfocus 7.6.8
PDF,HTML & EXCEL
November 06, 2009, 10:52 AM
GinnyJakes
It can't count something that is not there. Keep the multiple and put the results into a hold file. Report from the hold file and do your count there. That should give you the count you need.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
November 06, 2009, 11:06 AM
SG
Ginny,
thanks for your reply. I am not counting when detail record is missing. I want to add "1" when missing. May be I did not put it right.
why my "IF DETAILS.DETAILS.MASTER_KEY IS MISSING" not working.

Thanks,
SG.


Webfocus 7.6.8
PDF,HTML & EXCEL
November 06, 2009, 12:53 PM
SG
Nevermind. I figured it out. Used Inner join first to hold the data and Left outer join and unique for the report.
Looks like missing on will not work with join type mulitple.

Thanks,
SG.


Webfocus 7.6.8
PDF,HTML & EXCEL