| index

View V_ENQUIRY_PRTY_SUPP

Columns

Name | Type | Optional | Default | Comments
ENQU_ID | NUMBER |  |  |
PRTY_ID | NUMBER |  |  |
PRTY_ROLE | VARCHAR2(80) |  |  |
SUPP_PRTY_ID | NUMBER |  |  |
SUPP_PRTY_ROLE | VARCHAR2(80) |  |  |

SQL

    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;