hls_document_use_seal_vl.sql 1.94 KB
Newer Older
1
create or replace view hls_document_use_seal_vl as
2 3
select t.document_use_seal_id,
         t.document_table,
4
         t.document_id AS change_req_id,
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
         t.instruments_types,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.instruments_types
             and v.code = 'REPURCHASE_TYPES') as instruments_types_n,
         t.common_seal,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.common_seal
             and v.code = 'YES_OR_NO') as common_seal_n,
         t.corporate_visa_seal,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.corporate_visa_seal
             and v.code = 'YES_OR_NO') as corporate_visa_seal_n,
         t.legal_seal,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.legal_seal
             and v.code = 'YES_OR_NO') as legal_seal_n,
         t.con_special_seal,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.con_special_seal
             and v.code = 'YES_OR_NO') as con_special_seal_n,
         t.financial_seal,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.financial_seal
             and v.code = 'YES_OR_NO') as financial_seal_n,
         t.supervisio_seal,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.supervisio_seal
             and v.code = 'YES_OR_NO') as supervisio_seal_n,
40 41 42 43 44 45 46
         t.seal_number as SEAL_QUANTITY,
         t.seal_number,
         (select v.code_value_name
            from sys_code_values_v v
           where v.code_value = t.seal_number
             and v.code = 'SEAL_NUMBER'
             and v.code_enabled_flag='Y'
47
             and v.code_value_enabled_flag='Y')  seal_number_n
48
    from HLS_DOCUMENT_USE_SEAL t;