troubleshooting Question

SQL Statement assistance with AND NOT query splitting out

Avatar of Norm-al
Norm-alFlag for United States of America asked on
Microsoft SQL ServerSQL
24 Comments2 Solutions146 ViewsLast Modified:
WHERE     (NOT (PieceType = 65))  AND (material = 'melamine' OR
                      material = 'prefinished'))

I want to pull all parts except for those that are (piecetype = 65 and material=melamine) AND (piecetype = 65 and material=prefinished) there will be parts with piecetype 65 with different material i want to pull.. or there may be parts with different piecetype but same material that i want to pull as well. i only want to remove those 2 materials for that piece type.

Thanks!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 24 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 24 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros