apzl_leasing/src_sql/view/vi_insuranceinfo_second_transfer.sql

14 lines
748 B
SQL

create view vi_insuranceinfo_second_transfer as SELECT APZL.LB_INSURANCE_INFO.CONTRACT_ID AS CONTRACT_ID,
min(APZL.LB_INSURANCE_INFO.INSURER_START_DATE) AS INSURESTART,
max(APZL.LB_INSURANCE_INFO.INSURER_END_DATE) AS INSUREEND
FROM APZL.LB_INSURANCE_INFO
WHERE ((APZL.LB_INSURANCE_INFO.INSURER_START_DATE <= curdate()) AND (APZL.LB_INSURANCE_INFO.INSURER_END_DATE >= curdate()))
GROUP BY APZL.LB_INSURANCE_INFO.CONTRACT_ID;
-- comment on column vi_insuranceinfo_second_transfer.contract_id not supported: 合同编号
-- comment on column vi_insuranceinfo_second_transfer.insurestart not supported: 投保开始日期
-- comment on column vi_insuranceinfo_second_transfer.insureend not supported: 投保结束日期