I need to convert a query into an executable and I don't know how to
'write' the following into query painter. I'm okay with everything except
the 'MINUS'. I thought I'd bring the 'old' table into my main query, pull
in the sfd_perm_id's from both tables with an outer join and do a filter on
the results where the sfd_perm_id from the 'old' table is null. This,
however, takes forever to run and because we only get results if there is a
problem, I don't know yet if this works. Any suggestions?
select a.sfd_perm_id
from company_gsd a,
segment_fsd b
where b.fmt_fam_type = 3
and b.geo_seg_type is not null
and a.sfd_perm_id = b.sfd_perm_id
MINUS
select sfd_perm_id
from company_gsd_old;