blob: 34c3df839b21f1600cb75d88dcb15ee221323e32 [file] [log] [blame]
binquan.qiu729f54d2020-09-27 11:25:56 +08001 create or replace view v_transdtl as
2 SELECT t.transdate,t.transtime,t.billno,'' AS tradeno,'' AS authno,t.custname,c.bankcardno,d.rulename,
3t1.deptname,t.termid,s.shopname,'' AS searchno,t.amount,'' AS serviceamt,t.transtype,
4t.status,'T+1' AS cleartype,'普通' AS servicetype,0 AS revertamt,t.revbillno,
5substr((t.revbillno), 0, 9) AS revtransdate FROM ((((tb_transdtl t
6 JOIN tb_card c ON (((t.cardno) = (c.cardno))))
7 JOIN tb_discount_rule d ON ((t.ruleid = d.ruleid)))
8 JOIN ( SELECT c_1.custid,
9 p.deptname
10FROM (tb_customer c_1
11JOIN tb_dept p ON (((c_1.deptcode) = (p.deptcode))))) t1 ON (((t.custid) = (t1.custid))))
12 JOIN tb_shopsettlement s ON (((t.shopid) = (s.shopid))));