SQL 2000, some functions from client side not working

為{幸葍}努か 提交于 2019-12-24 09:17:14

问题


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?


回答1:


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?



来源:https://stackoverflow.com/questions/2691403/sql-2000-some-functions-from-client-side-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!