SQL查询在两个日期之间选择日期我有一个start_date和end_date..我想得到这两个日期之间的日期列表。有人能帮我指出我查询中的错误吗。select Date,TotalAllowance
from Calculation
where EmployeeId=1
and Date between 2011/02/25 and 2011/02/27这里Date是datetime变量。
3 回答
沧海一幻觉
TA贡献1824条经验 获得超5个赞
select Date, TotalAllowance from Calculation where EmployeeId = 1 and Date between '2011/02/25' and '2011/02/27'
select Date, TotalAllowance from Calculation where EmployeeId = 1 and Date >= '2011/02/25' and Date <= '2011/02/27'
交互式爱情
TA贡献1712条经验 获得超3个赞
date 00:00:00.000
<
.
select Date,TotalAllowance from Calculation where EmployeeId=1 and Date between '2011/02/25' and '2011/02/27 23:59:59.999'
select Date,TotalAllowance from Calculation where EmployeeId=1 and Date >= '2011/02/25' and Date < '2011/02/28'
select Date,TotalAllowance from Calculation where EmployeeId=1 and Date >= '2011/02/25' and Date <= '2011/02/27 23:59:59.999'
select Date,TotalAllowance from Calculation where EmployeeId=1 and Date between '2011/02/25' and '2011/02/28'
湖上湖
TA贡献2003条经验 获得超2个赞
select Date,TotalAllowance from Calculation where EmployeeId=1 and [Date] between '2011/02/25' and '2011/02/27'
Date
添加回答
举报
0/150
提交
取消