老的transFeeView表记录
[SQL] syntaxhighlighter_viewsource syntaxhighlighter_copycode SELECT
dbo.T_M_transFee.transFeeID,
dbo.T_M_transFee.OperatorID,
dbo.T_M_transFee.transFeeNum,
dbo.transFeeAuditDriverView.driverID,
dbo.transFeeAuditDriverView.driverName,
Sum(dbo.transFeeAuditDriverView.prePayMoney) AS prePayMoney,
Sum(dbo.T_M_transFeeDetails.Paymoney) AS Paymoney,
T_P_Operator.name as addOpName
FROM
dbo.T_M_transFee LEFT JOIN dbo.T_M_transFeeDetails on
dbo.T_M_transFee.transFeeNum = dbo.T_M_transFeeDetails.transFeeNum,
dbo.transFeeAuditDriverView ,
dbo.T_P_Operator
WHERE
dbo.T_M_transFee.transFeeID = dbo.transFeeAuditDriverView.transFeeID and dbo.T_P_Operator.operatorID = dbo.T_M_transFee.OperatorID
GROUP BY
dbo.T_M_transFee.transFeeID,
dbo.T_M_transFee.transFeeNum,
dbo.T_M_transFee.OperatorID,
dbo.transFeeAuditDriverView.driverName,
dbo.transFeeAuditDriverView.driverID,
T_P_Operator.name |