sql server查询问题 [英] problem with sql server query

查看:125
本文介绍了sql server查询问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

select [receiptno],[Month],[afeeafterdiscount]
    from paymentmaster  where depositedate between '06/04/2010' and '06/10/2010'



结果集为空.



The result set is empty. What’s going on?

推荐答案

假设您的表实际上具有给定日期的记录,那么问题就出在查询和沉积值之间的日期转换.尝试mm/dd/yyyy或在where子句中使用convert函数.
Assuming that your table actually has records for the given dates, the problem lies in the date conversion between your query and the values in depositedate. Try mm/dd/yyyy or use the convert function in your where clause.


这篇关于sql server查询问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆