bp_tenant_rate_detail_lv.sql 6.64 KB
Newer Older
1 2 3 4 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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
create or replace view bp_tenant_rate_detail_lv as
select "BP_DETAL_ID",
       "PROJECT_ID",
       "BP_BIRTH",
       "BP_MARRIAGE",
       "BP_HEALTH",
       "BP_BORN",
       "PROPERTY_BELONG",
       "OWN_PROPERTY_ADDRESS",
       "HOUSE_AREA",
       "HOUSE_VALUE",
       "OWN_MONEY",
       "BANK_CREDIT_APPROVAL",
       "OTHER_OWN_ASSETS",
       "FAMILY_SOURCE_INCOME",
       "FAMILY_AVG_INCOME",
       "FAMILY_MONTH_AVG_OUTCOME",
       "BANK_LOAN",
       "OTHER_LOAN",
       "FIXED_ASSETS",
       "CAPITAL",
       "CAPITAL_PLACE",
       "CAR_TYPE",
       "CAR_BRAND",
       "CAR_NUM",
       "CAR_BUY_DATE",
       "CAR_BUY_MONEY",
       "WORK_EXPERIENCE",
       "WORK_OPERATOR",
       "WORK_TYPE",
       "WORK_AVG_MONTH_INCOME",
       "WORK_AVG_MONTH_OUTCOME",
       "OTHER_DESCRIPTION",
       "PAYMENT_SOURCE",
       "E_PLACE",
       "E_CONTRACT_AMOUNT",
       "CONTRACT_COPY",
       "E_CON_AUTHENTICITY",
       "SURVEY_FIT",
       "DAILY_CREDIT",
       "BORROW_SITUATION",
       "RENT_REPAYMENT",
       "RENTAL_BALANCE",
       "LIQUIDATED_DAMAGES",
       "GUAR_MORTGAGE_STATUS",
       "PAST_CONT_EXE_STATUS",
       "INDUSTRY_JUDGEMENT",
       "THIRD_PARTY_GUARANTEE",
       "THIRD_PARTY_CREDIBILITY",
        (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'MARITAL_STATUS'
           and scv.code_value = t1.bp_marriage
           and  scv.code_enabled_flag='Y') bp_marriage_n,
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'HEALTH_STATUS'
           and scv.code_value = t1.bp_health
           and  scv.code_enabled_flag='Y') bp_health_n,
              (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'HOUSEHOLD_CODE'
           and scv.code_value = t1.bp_born
           and  scv.code_enabled_flag='Y') bp_born_n,
            (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'A51000000'
           and scv.code_value = t1.property_belong
           and  scv.code_enabled_flag='Y') property_belong_n,
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'HOUSEHOLD_ASSET'
           and scv.code_value = t1.house_value
           and  scv.code_enabled_flag='Y') house_value_n,
            (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'BANK_CREDIT_APPROVAL'
           and scv.code_value = t1.bank_credit_approval
           and  scv.code_enabled_flag='Y') bank_credit_approval_n,
           
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'HLS_YEARLY_INCOME'
           and scv.code_value = t1.family_avg_income
           and  scv.code_enabled_flag='Y') family_avg_income_n,
           
              (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'HLS_CUS_WORKING_AGE_TYPE'
           and scv.code_value = t1.work_experience
           and  scv.code_enabled_flag='Y') work_experience_n,
           
                (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'WORK_OPERATOR'
           and scv.code_value = t1.work_operator
           and  scv.code_enabled_flag='Y') work_operator_n,
            (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'WORK_STYLE'
           and scv.code_value = t1.work_type
           and  scv.code_enabled_flag='Y') work_type_n,
           
              (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'WORK_AVG_MONTH_INCOME'
           and scv.code_value = t1.work_avg_month_income
           and  scv.code_enabled_flag='Y') work_avg_month_income_n,
           
                  (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'HOUSEHOLD_CODE'
           and scv.code_value = t1.e_place
           and  scv.code_enabled_flag='Y') e_place_n,
                 (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'E_CONTRACT_AMOUNT'
           and scv.code_value = t1.e_contract_amount
           and  scv.code_enabled_flag='Y') e_contract_amount_n,
           
               (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'YES_OR_NO'
           and scv.code_value = t1.contract_copy
           and  scv.code_enabled_flag='Y') contract_copy_n,
               (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'E_CON_AUTHENTICITY'
           and scv.code_value = t1.e_con_authenticity
           and  scv.code_enabled_flag='Y') e_con_authenticity_n,
           
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'SURVEY_FIT'
           and scv.code_value = t1.survey_fit
           and  scv.code_enabled_flag='Y') survey_fit_n,
           
           
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'BP_CREDIT_CONSCIOUS'
           and scv.code_value = t1.daily_credit
           and  scv.code_enabled_flag='Y') daily_credit_n,
           
            (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'REPAYMENT_STATE'
           and scv.code_value = t1.borrow_situation
           and  scv.code_enabled_flag='Y') borrow_situation_n,
           
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'YES_OR_NO'
           and scv.code_value = t1.guar_mortgage_status
           and  scv.code_enabled_flag='Y') guar_mortgage_status_n,
           
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'PAST_CONT_EXE_STATUS'
           and scv.code_value = t1.past_cont_exe_status
           and  scv.code_enabled_flag='Y') past_cont_exe_status_n,
           
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'INDUSTRY_JUDGEMENT'
           and scv.code_value = t1.industry_judgement
           and  scv.code_enabled_flag='Y') industry_judgement_n,
             (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'YES_OR_NO'
           and scv.code_value = t1.third_party_guarantee
           and  scv.code_enabled_flag='Y') third_party_guarantee_n,
           
            (select code_value_name
          from sys_code_values_v scv
         where scv.code = 'THIRD_PARTY_CREDIBILITY'
           and scv.code_value = t1.third_party_credibility
           and  scv.code_enabled_flag='Y') third_party_credibility_n
           
           
  from bp_tenant_rate_detail t1;