热度临时备忘
老的transFeeView表记录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 JOINdbo.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.transFeeIDand 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
页:
[1]