I have a query with a left outer join, and a formula that calculates based on comparing one field in each table. I am having difficulty in making the value 0 when the field does not exist in the right table.
This is the formula I'm using right now.
IF {LEFTTABLE.VALUE} <> {RIGHTTABLE.VALUE}
and {LEFTTABLE.VALUE} <> 0
THEN {ANOTHERTABLE.VALUE} ELSE
if not isnull ({LEFTTABLE.VALUE}) then {LEFTTABLE.VALUE}
else
0
It works fine for everything except when there is no matching record in RIGHTTABLE. Instead of putting a 0 in the calculated field, it puts nothing, which then screws up other calculations that are based on this one.
Is there hope?
Thanks,
Cathy
This is the formula I'm using right now.
IF {LEFTTABLE.VALUE} <> {RIGHTTABLE.VALUE}
and {LEFTTABLE.VALUE} <> 0
THEN {ANOTHERTABLE.VALUE} ELSE
if not isnull ({LEFTTABLE.VALUE}) then {LEFTTABLE.VALUE}
else
0
It works fine for everything except when there is no matching record in RIGHTTABLE. Instead of putting a 0 in the calculated field, it puts nothing, which then screws up other calculations that are based on this one.
Is there hope?
Thanks,
Cathy