SELECT DISTINCT pblpat.nplpartref , ppartt.npartgenu , ppartt.xpartext , pblpat.xordergun , pblpat.hpartplblk , ppartt.creplblpart FROM pblpat JOIN ppartt ON ( ppartt.clangjap = '2' AND ppartt.npartgenu = pblpat.npartgenu ) LEFT OUTER JOIN pbprmt ON ( pbprmt.hpartplblk = pblpat.hpartplblk AND pbprmt.clangjap = '2' ) WHERE pblpat.npl = '18SD401' AND pblpat.nplblk = 'BOP0100' AND ( ( EXISTS ( SELECT pb.hmodtyp FROM pbpmtt AS pb WHERE pb.hpartplblk = pblpat.hpartplblk AND pb.hmodtyp = '23436' ) ) OR ( ( NOT EXISTS ( SELECT pb.hmodtyp FROM pbpmtt AS pb WHERE pb.hpartplblk = pblpat.hpartplblk ) ) AND ( EXISTS ( SELECT pb.hmodtyp FROM pblmtt AS pb WHERE pb.npl = pblpat.npl AND pb.nplblk = pblpat.nplblk AND pb.hmodtyp = '23436' ) ) ) )
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)