34,696
社区成员
SELECT A.LCBH AS [流程编号], A.SQRQ AS [申请日期], C.lastname AS [申请人], D.departmentname AS [所属部门], A.ccsy AS [报销事由],
E.subcompanyname AS [付款单位], A.ccksrq AS [出差开始日期], A.ccjsrq AS [出差结束日期],
F.name AS [预算科目], G.name AS [研发其他选项],
CASE B.cdztlx WHEN 0 THEN '个人' WHEN 1 THEN '部门' WHEN 2 THEN '分部' WHEN 3 THEN '成本中心' END AS [承担主体类型],
H.departmentname AS [承担主体], B.fyrq AS [费用日期], B.qqdd AS [起讫地点], B.ts AS [天数], B.fjp AS [飞机票],
B.qcp AS [汽车票], B.hcp AS [火车票], B.zsf AS [住宿费], B.zdf AS [招待费], B.hsbt AS [伙食补贴],
B.jtbt AS [交通补贴], B.qt AS [其他], B.bxjexj AS [报销金额小计], B.zy AS [摘要], B.sbje AS [实报金额]
FROM formtable_main_101 A
LEFT JOIN formtable_main_101_dt1 B ON A.id = B.mainid
LEFT JOIN HrmResource C ON A.sqr = C.id
LEFT JOIN HrmDepartment D ON A.ssbm = D.id
LEFT JOIN hrmsubcompany E ON A.fkdw = E.id
LEFT JOIN fnabudgetfeetype F ON B.yskm = F.id
LEFT JOIN mode_selectitempagedetail G ON B.yfqtxx = G.disorder
LEFT JOIN HrmDepartment H ON B.cdzt = H.id
WHERE F.archive <> 1 AND G.mianid = 89
就是红色部分,去掉就显示700多条,加上就只有55条,跟join一样,left失效了。help!