First, you find the prtnum
values that have UPCCOD
, then from the main table you select only those that are not in that list :
SELECT *
FROM alt_prtmst
WHERE prtnum NOT IN (
SELECT prtnum
FROM alt_prtmst
WHERE alt_prt_typ = 'UPCCOD'
)