Ok, I guess what I was trying to do will not work. I assumed if I kept the question easy, I could get an answer and then edit it to fit what I actually need but the way the answer is built, I can't figure it out on my own.
What I actually need is this.
Count the Doc_No that have partnumber '10-38' as line_type 01 or 15 and also has a line_type 9 on the same Doc_No but the partnumber in Line_type 9 cannot be partnumber 'CH92' or 'CH93'
SELECT COUNT(Doc_NO) AS Count
WHERE (PartNumber = '10-38' AND Line_type in ('01','15'))
and not PartNumber in ('CH92','CH93') AND LINE_TYPE = '09'
Thank you for the help and I'm sorry I was not clear in my first question.