开发者

SQL 2000, some functions from client side not working

开发者 https://www.devze.com 2022-12-28 07:11 出处:网络
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 t开发者_运维技巧o find duplicat

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 t开发者_运维技巧o 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?


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消