March 26, 2008, 01:50 PM
CarrollJoin where one key is alpha, one key is integer
In SQL, this works:
SELECT * FROM
MNDS.DISBCLM A,
MIDIB.CLACTHIS B
WHERE
PGM_BNFT_CD = '02' AND
ADJU_LVL_CD = 'IN' AND
INT(A.EDIB_FLDR_NUM) = B.FLDR_NUM
;
How would I go about doing this in Developer Studio 764? I've tried various things to no avail. What tools would produce this kind of result, where I need to convert one key to integer to match the other key?
Thanks,
Carroll Rinehart
March 26, 2008, 02:21 PM
LeahLook into the 'defined based join'. (EXAMPLE ASSUMES THE NUMERIC FIELD IS I9) Assuming
no typo's
JOIN EDITFIELD WITH EDIB_FLDR_NUM IN DISBCLM TO FLDR_NUM IN CLACTHIS AS J0
END
DEFINE FILE DISBCLM
EDITFIELD/I9 = EDIT(EBDIB_FLD_NUM);
END
TABLE FILE DISBCLM
WHERE
PGM_BNFT_CD = '02' AND
ADJU_LVL_CD = 'IN'
PRINT *
END
Drawback to this is with defined based joins optimization is bad.
OTHER OPTION use the SQL passthru capabilities.
Also, Carroll, would you add the version of WebFOCUS you are using to your signature. Not all things work in all versions.