Either that (subject line), or I just don't understand how to use it. I found it to be really frustrating, but here's my problem.
I have 2 tables.....RPRARSC with 964 ID's (based on selection critera) and RPRAWRD with 11,195 ID's. Now, most of RPRARSC's ID's are in RPRAWRD, so I want to select all of the ID's that exist in RPRARSC and NOT in RPRAWRD. So I resort to matching. Here is my code.
MATCH FILE RPRARSC
BY RPRARSC_PIDM
WHERE RPRARSC_AIDY_CODE EQ '0607'
WHERE RPRARSC_EST_AMT GT 0
RUN
FILE RPRAWRD
BY RPRAWRD_PIDM
WHERE RPRAWRD_AIDY_CODE EQ '0607'
WHERE RPRAWRD_ACCEPT_AMT GT 0
AFTER MATCH HOLD OLD-NOT-NEW
END
When I run the report below based on this, I get a distinct count of 964. This is not the correct answer. I've tried different variations of the MATCHING wizard's merge phrases, but I still come up with the same number. I run this in SQL using the MINUS statement, and I get 354. I've also run this a few other ways and 354 is the correct distinct count.
TABLE FILE HOLD
SUM
CNT.DST.RPRARSC_PIDM
ON TABLE NOTOTAL
END
I'd love to know what I am doing wrong with MATCH, even if there is a better way to do this, if it's possible.
Thanks,
Brian
-Brian
Webfocus v7.6.1 on Windows XP