SQL 2000,客户端的某些功能不起作用
我创建一个查询:
Select * from HR_Tsalary where month='3' and year ='2010'
结果是 473 条记录,发现 2 个重复记录,然后我创建另一个查询以仅查找重复记录:
SELECT Emp_No, COUNT(*) FROM HR_Tsalary
WHERE year = '10' AND month = '3'
GROUP BY Emp_No HAVING COUNT(*) > 1
结果是通过 Visual Basic Adodb 代码从客户端发出的零记录。当我使用来自服务器的相同查询时,结果是 2 条记录。从服务器端和客户端创建查询有什么不同吗?
I create a query:
Select * from HR_Tsalary where month='3' and year ='2010'
the result is 473 records and I found 2 duplicate record, then I create another query to find duplicate record only:
SELECT Emp_No, COUNT(*) FROM HR_Tsalary
WHERE year = '10' AND month = '3'
GROUP BY Emp_No HAVING COUNT(*) > 1
the result is zero record from client side thru Visual Basic Adodb code. When I use same query from server the result is 2 records. Is there any different between when create a query from server side and client side?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的第二个查询按 YEAR='10' 进行过滤,而第一个查询按 YEAR='2010' 进行过滤。大概就是这个原因。您确定在两端运行完全相同的查询吗?
Your second query filters on YEAR='10' whereas the first one filters on YEAR='2010'. That's probably the cause. Are you sure you're running the exact same query on both ends?