create view vi_lc_ebank_bill as SELECT LCE.ID                AS ID,
       LCE.EBANK_NUMBER      AS EBANK_NUMBER,
       LCE.EBANK_SN          AS EBANK_SN,
       LCE.CUSTOMER_ID       AS CUSTOMER_ID,
       LCE.CLIENT_NAME       AS CLIENT_NAME,
       LCE.FACT_DATE         AS FACT_DATE,
       LCE.FACT_MONEY        AS FACT_MONEY,
       LCE.NOWITH_MONEY      AS NOWITH_MONEY,
       LCE.OWN_BANK          AS OWN_BANK,
       LCE.OWN_ACCOUNT       AS OWN_ACCOUNT,
       LCE.OWNACC_NUMBER     AS OWNACC_NUMBER,
       LCE.CLIENT_BANK       AS CLIENT_BANK,
       LCE.CLIENT_ACCOUNT    AS CLIENT_ACCOUNT,
       LCE.CLIENT_ACC_NUMBER AS CLIENT_ACC_NUMBER,
       LCE.NO_CONTRACT       AS NO_CONTRACT,
       LCE.HAD_MONEY         AS HAD_MONEY,
       LCE.MAYOPE_MONEY      AS MAYOPE_MONEY,
       LCE.UPLOAD_DATE       AS UPLOAD_DATE
FROM (APZL.LC_EBANK LCE
LEFT JOIN (
    SELECT sum(`nvl`(APZL.LC_EBANK_BILL.BILL_MONEY, 0)) AS BILLMONEY, APZL.LC_EBANK_BILL.EBANK_NUMBER AS EBANK_NUMBER
    FROM APZL.LC_EBANK_BILL
    GROUP BY APZL.LC_EBANK_BILL.EBANK_NUMBER
) LEB ON ((LEB.EBANK_NUMBER = LCE.ID)))
WHERE (LCE.MAYOPE_MONEY >= `nvl`(LEB.BILLMONEY, 0));

-- comment on column vi_lc_ebank_bill.id not supported: 标识

-- comment on column vi_lc_ebank_bill.ebank_number not supported: 网银编号

-- comment on column vi_lc_ebank_bill.ebank_sn not supported: 流水号

-- comment on column vi_lc_ebank_bill.customer_id not supported: 客户名称

-- comment on column vi_lc_ebank_bill.CLIENT_NAME not supported: 付款人

-- comment on column vi_lc_ebank_bill.FACT_DATE not supported: 到账日期

-- comment on column vi_lc_ebank_bill.FACT_MONEY not supported: 到账金额

-- comment on column vi_lc_ebank_bill.NOWITH_MONEY not supported: 非业务金额[与系统无关金额]

-- comment on column vi_lc_ebank_bill.own_BANK not supported: 本方银行

-- comment on column vi_lc_ebank_bill.own_ACCOUNT not supported: 本方账户

-- comment on column vi_lc_ebank_bill.ownACC_NUMBER not supported: 本方账号

-- comment on column vi_lc_ebank_bill.CLIENT_BANK not supported: 收/付方开户行名

-- comment on column vi_lc_ebank_bill.CLIENT_ACCOUNT not supported: 收/付方名称

-- comment on column vi_lc_ebank_bill.CLIENT_ACC_NUMBER not supported: 收/付方帐号

-- comment on column vi_lc_ebank_bill.NO_CONTRACT not supported: 是否暂收款

-- comment on column vi_lc_ebank_bill.HAD_MONEY not supported: 已核销金额

-- comment on column vi_lc_ebank_bill.MAYOPE_MONEY not supported: 可核销金额

-- comment on column vi_lc_ebank_bill.UPLOAD_DATE not supported: 上传时间

