CREATE OR REPLACE VIEW v_enquiry_prty_supp AS 
SELECT enqu.ID AS enqu_id, enro1.prty_id AS prty_id, enro1.rt_code AS prty_role, enquiry_suppliers.prty_id AS supp_prty_id,
 enquiry_suppliers.rt_code AS supp_prty_role
  FROM enquiries enqu,
       enquiry_roles enro1,
       (SELECT enro.*
          FROM enquiry_roles enro
         WHERE enro.rt_code = 'ENQ SUPP') enquiry_suppliers
 WHERE enro1.enqu_id = enquiry_suppliers.enqu_id
   AND enro1.enqu_id = enqu.ID;
