N M
asked on
MS-ACCESS conditional SELECT
In MS-ACCESS I have two tables, say T1 and T2, both of them with fields T1.Customer_No, T1.AMOUNT, T1.TRADE_ID and T1.DATE1 fields and T2.Customer_No, T2.AMOUNT_1, T2.AMOUNT_2 and T2.DATE1.
I need to select all rows from T1 where :
T1.AMOUNT = ABS(T2.AMOUNT_1) *OR* T1.AMOUNT = ABS(T2.AMOUNT_2)
and additionally
T1.DATE1 = T2.DATE1
Constraint: if T2.AMOUNT_1 is null or T2.AMOUNT_2 is null, then I don't want any comparison (excluded records).
(No I can't join customer ids)
Any help appreciated.
I need to select all rows from T1 where :
T1.AMOUNT = ABS(T2.AMOUNT_1) *OR* T1.AMOUNT = ABS(T2.AMOUNT_2)
and additionally
T1.DATE1 = T2.DATE1
Constraint: if T2.AMOUNT_1 is null or T2.AMOUNT_2 is null, then I don't want any comparison (excluded records).
(No I can't join customer ids)
Any help appreciated.
ASKER
Sorry didn't understood the comment.......
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, worked, thank you very much !
ASKER
Accurate and fast - thank you !
Open in new window