I am wanting to see ONLY the documents where 3 criteria's are met but the 3 criteria's have multiple criteria's.
Here is my code:
SELECT
t0.DocNum
FROM
dbo.OIPF t0 inner join IPF2 t1 ON t0.DocEntry = t1.DocEntry
inner join IPF1 t2 on t0.DocEntry = t2.DocEntry
WHERE
(t1.OhType = 'W' and t1.CostSum > 0) and
(t1.OhType = 'F' and T1.CostSum > 0) and
(t1.OhType = 'Q' and T1.CostSum > 0)
This gives me zero results. But to me that is how I would make sure that all 3 of these cost types have totals greater than 0.
Could any one help me on this?
Thanks!!