select ncf_code nonconformity,ncf_desc description,ncf_org organization FROM r5nonconformities,  r5objects
WHERE obj_org = <control.org>
  AND obj_code = ncf_object
  AND obj_org = ncf_object_org
  AND EXISTS( SELECT 'x'
                  FROM   r5nonconformobservations
                  WHERE  ncf_code = nco_code
                  AND    nco_workorder = <param.workordernum> )
  order by ncf_code ASC, ncf_desc ASC, ncf_org ASC
