您的位置:首页 > 其它

datediff函数与between 函数间的差异使用

2014-11-07 13:55 141 查看
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)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: