ms access - SQL based on complex criteria -
i'm struggling sql statement i'm trying write in ms access , appreciate help.
i have table:
*************************** * attr1 * attr2 * attr3 * *************************** * * * 1 * * * b * 2 * * * b * 3 * * * c * 4 * * b * * 1 * * d * * 1 * * * * 2 * ***************************
i need result this:
*************************** * attr1 * attr2 * attr3 * *************************** * b * * 1 * * d * * 1 * * * * 2 * * * b * 3 * * * c * 4 * ***************************
so, need in result rows attr1 not null, , other rows attr3 has different values in rows attr1 not null.
i can in access in way make 1 query select rows attr1 not null, 1 "find unmatched" query select rows values in attr3 not included in first query, , make union of 2 queries... need more direct approach (one sql statement if possible).
thank much!
i think need this:
select attr1, attr2, attr3 table attr1 not null or attr3 not in (select attr3 table attr1 not null)
Comments
Post a Comment