select distinct inc_cat_sc from inc_cat
that returns these results:
3RD PARTY CAUSE
ACCESS
ACCESS DENIED
APPROVE
AUTHORIZATION
I also have this query:
select inc_cat_sc from inc_cat where inc_cat_sc NOT IN
(select distinct
inc_cat.inc_cat_sc
from
inc_cat inner join incident on incident.cause_id = inc_cat.inc_cat_id
where
inc_cat.inc_cat_id <> 0)
That returns these results:
3RD PARTY CAUSE
ACCESS
Then I have a 3rd query:
select inc_cat_sc from inc_cat where inc_cat_sc NOT IN
(select distinct
inc_cat.inc_cat_sc
from
inc_cat inner join incident on incident.inc_cat_id = inc_cat.inc_cat_id
where inc_cat.inc_cat_id <> 0)
That returns:
ACCESS
ACCESS DENIED
I need a query that will give me all the values in the first query that are not in either the 2nd query or the 3rd query.
So the results I would be looking for are:
<--
select distinct inc_cat_sc from inc_cat where inc_cat_sc not in
((select distinct
inc_cat.inc_cat_sc
from
inc_cat inner join incident on incident.cause_id = inc_cat.inc_cat_id
where
inc_cat.inc_cat_id <> 0)
union
(select distinct
inc_cat.inc_cat_sc
from
inc_cat inner join incident on incident.inc_cat_id = inc_cat.inc_cat_id
where
inc_cat.inc_cat_id <> 0))
-->