SELECT customer.salesman as 区域经理代号 , customer.serve_man1 as 业务经理代号,customer.customer_id,
convert(date,cash.trans_date,120) as 日期,
(cash.act_amt + cash.agio_amt) AS 金额
FROM cash left join customer on customer.customer_id=cash.customer_id
WHERE cash.cash_type <> 'R'
AND cash.approved <> 'V'
and (datediff(day,日期,'2014-07-01')<=0 and datediff(day,日期,'2014-09-01')>=0)
convert(date,cash.trans_date,120) as 日期,
(cash.act_amt + cash.agio_amt) AS 金额
FROM cash left join customer on customer.customer_id=cash.customer_id
WHERE cash.cash_type <> 'R'
AND cash.approved <> 'V'
and (datediff(day,日期,'2014-07-01')<=0 and datediff(day,日期,'2014-09-01')>=0)