遇到个很bt的时间查询问题
select * from table where right(convert(char(19),ComeTime,120),8) between '09:00:00' and '17:00:00'
这样一条语句是可以查询的
select * from guest where right(convert(char(19),ComeTime,120),8) between '9:00:00' and '17:00:00'
这样写就不行了,两句的唯一区别是09点和9点
从delphi的TDateTimePicker中读出的Time,TimeToStr后就是'9:00:00'
这样在sql server中就不能查询
大家都是怎么解决这么bt的问题的,郁闷ing。。