| index

View V_PRTY_ID_FOR_ENQUIRIES

Columns

Name | Type | Optional | Default | Comments
ENQU_ID | NUMBER |  |  |
START_DATE | DATE |  |  |
END_DATE | DATE | Y |  |
DESCRIPTION | VARCHAR2(80) | Y |  |
PRTY_ID | NUMBER |  |  |
RT_CODE | VARCHAR2(80) |  |  |

SQL

    CREATE OR REPLACE VIEW V_PRTY_ID_FOR_ENQUIRIES AS
    SELECT DISTINCT enro.enqu_id
                   ,enro.start_date
                   ,enro.end_date
                   ,enro.DESCRIPTION
                   ,prel.from_parl_prty_id AS prty_id
                   ,prel.from_rt_code AS rt_code
      FROM v_party_relationships prel
          ,enquiry_roles         enro
     WHERE prel.to_parl_prty_id = enro.prty_id
          --AND enro.rt_code = 'ENQ SUPP'
       --AND prel.from_rt_code IN ('SUPPADMIN', 'AGENT');