日期:2014-05-19  浏览次数:20765 次

请问sql server2000怎样查询两个日期之间的数据?
想要查询上个月29日到这个月28日的数据,搜索条件应该怎么写?

------解决方案--------------------
select * from table where datefield> =cast(convert(char(8),dateadd(m,-1,getdate()),120)+ '29 ' as datetime) and datefield <=cast(convert(char(8),getdate(),120)+ '28 ' as datetime);