Reputation: 85
I have a query that I need the results to be suppressed/removed under two conditions.
SELECT
CompanyID,
CustomerID,
Type,
CustomerCode,
CustomerType,
CaseRank
FROM Table
ORDER BY CaseRank
I need to remove any rows that have a Type of "TypeA" AND a CaseRank that's not equal to 1.
Upvotes: 0
Views: 50
Reputation: 2164
SELECT
CompanyID,
CustomerID,
Type,
CustomerCode,
CustomerType,
CaseRank
FROM Table
WHERE NOT (Type='TypeA' AND CaseRank != 1)
ORDER BY CaseRank
Upvotes: 2