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)
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)
相关文章推荐
- SQLServer datediff () 函数 使用例子
- DATEDIFF 函数的使用
- 使用DATEDIFF函数计算时间差
- ORACLE中函数MONTHS_BETWEEN的使用
- C&C++在函数使用上的差异
- python3.x和python2.x的translate与maketrans函数使用差异
- sql语句case when使用和date_formate()的使用,DATEDIFF(字段1,字段2)获取天数,常用的MYSQL的函数
- DATEDIFF 函数使用
- Mysql 函数使用记录(一)——DATEDIFF、CONCAT
- 在 C++Builder 工程里使用 Visual C++ DLL——第1部分:C函数
- 创建和使用不定数目参数的函数
- 使用未公开关键字在 C# 中导入外部 printf 等参数数量可变函数
- DateDiff 函数详解
- zt: SQL*PLUS常用命令和Decode()函数使用技巧
- 事件处理函数OnEnter OnExit 使用一例
- VC中使用低级音频函数WaveX播放声音文件
- 使用未公开关键字在 C# 中导入外部 printf 等参数数量可变函数 [1] CLR 支持
- 钩子技术介绍及函数使用
- 刚才遇到了关于C#使用外部DLL函数上的char*的问题。
- Effective STL: Item 44:优先使用与泛型算法同名的成员函数