The phrase "is present" is not so clear for me.
Is that "NOT NULL"?
Or, a row was retrieved?
In either case, I couldn't understand the relationship of the followings.
Quote:
|
If present in TBLM --> gives M
|
and
Quote:
WHEN A.COLA IS NOT NULL
AND B.COLA IS NOT NULL THEN 'M'
|
Because, rows of TBLM are always retrieved if the predicate "M.COLA = XXX" was true,
regardless the rows of TBLA or TBLB were retrieved or not.
Anyhow, answer to your question might be:
WHEN A.COLA IS NOT NULL OR B.COLA IS NOT NULL THEN 'Y'