我的查询似乎没有提取所有可能的记录。 [英] My query doesn't seem to be pulling all possible records.

查看:64
本文介绍了我的查询似乎没有提取所有可能的记录。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从35000+记录表中提取的查询但由于某种原因,任何超过25999的记录都没有通过。


表是一个列表员工 - 和他们的任务 - 因此有相同员工的记录很多 - 因此有35000多条记录。


当我提取查询时 - 我得到所有员工编号为25841及以下......但是那些编号为26000+的人不会表现出来。我可以在桌子上单独过滤那些,但即使我试图仅仅查询26000范围内的那些员工 - 他们也不会出现?????


我很困惑!有没有理由发生这种情况?


我想知道从sql服务器(原始表所在的位置)拉出来会有所帮助 - 它似乎工作正常 - 我制作了一张桌子的副本,把它放在光盘上并将其复制到我的笔记本电脑顶部,这样我就可以修复它。在家里的数据库 - 因为当天没有足够的时间....

I have a query that is pulling from a table of 35000+ records But for some reason any records beyond 25999 are not coming thru.

The Table is a list employees - and thier assignments - so there are many records with the same employee - thus the 35000+ records.

When I pull the query - I get all employees numbered 25841 and below...but the ones that are numbered 26000+ won''t show. I can filter for those individually on the table itself, but even if I try to query just for those employee''s in the 26000 range - they won''t show up?????

I am confused! Is there a reason this is happening?

I guess it would be helpful to know that when pulling from the sql server (where the original table resides) - it seems to work okay - I made a copy of the table put it on a disc and copied it to my lap top so I could "fix" the database at home - cause there aren''t enough hours in the day....

推荐答案

一些想法:
  • 你能不能从坏发布SQL查询?
  • 您是否有可能复制所有记录?
A couple of thoughts:
  • Could you post the SQL from the "bad" query?
  • Is it possible that you failed to copy all the records?



有几点想法:
  • 你能从坏中发布SQL吗?查询?
  • 您是否有可能复制所有记录?
A couple of thoughts:
  • Could you post the SQL from the "bad" query?
  • Is it possible that you failed to copy all the records?



我以为我可能没有复制所有记录......但是独立表中有25841以上的记录


查询 - 是一个简单的查询...


这里是代码...(抱歉有很多字段)


SELECT qryAllDemosbyDateRange.ProjectCode,qryAllDemosbyDateRange。[Employee Number],qryAllDemosbyDateRange。[Demo Date] ],qryAllDemosbyDateRange.Store_No,qryAllDemosbyDateRange。[名],qryAllDemosbyDateRange。[姓氏],qryAllDemosbyDateRange.Shirt_size,qryAllDemosbyDateRange.ShippingNumber,qryPanasonicShirtCheckNew2。[员工编号]

。从qryAllDemosbyDateRange RIGHT JOIN(qryPanasonicShipCheckNewProgram LEFT JOIN qryPanasonicShirtCheckNew2 ON qryPanasonicShipCheckNewProgram.qryAllDemosByDateR ange。[Employee Number] = qryPanasonicShirtCheckNew2。[Employee Number])ON qryAllDemosbyDateRange。[员工编号] = qryPanasonicShipCheckNewProgram.qryAllDemosByDateR ange。[员工编号]

WHERE(((qryPanasonicShirtCheckNew2。[员工编号])是空的));


可能是左右连接?


我只使用4个字段标准......

I thought I might not have copied all the records...but the standalone table has the records above 25841 in it

The query - is a simple query...

here is the code... (sorry there are lots of fields)

SELECT qryAllDemosbyDateRange.ProjectCode, qryAllDemosbyDateRange.[Employee Number], qryAllDemosbyDateRange.[Demo Date], qryAllDemosbyDateRange.Store_No, qryAllDemosbyDateRange.[First Name], qryAllDemosbyDateRange.[Last Name], qryAllDemosbyDateRange.Shirt_size, qryAllDemosbyDateRange.ShippingNumber, qryPanasonicShirtCheckNew2.[Employee Number]
FROM qryAllDemosbyDateRange RIGHT JOIN (qryPanasonicShipCheckNewProgram LEFT JOIN qryPanasonicShirtCheckNew2 ON qryPanasonicShipCheckNewProgram.qryAllDemosByDateR ange.[Employee Number] = qryPanasonicShirtCheckNew2.[Employee Number]) ON qryAllDemosbyDateRange.[Employee Number] = qryPanasonicShipCheckNewProgram.qryAllDemosByDateR ange.[Employee Number]
WHERE (((qryPanasonicShirtCheckNew2.[Employee Number]) Is Null));

could it be the left and right joins?

There are only 4 fields that I am using criteria on....



我以为我可能没有复制所有记录......但是独立表的记录大于25841,其中
I thought I might not have copied all the records...but the standalone table has the records above 25841 in it



Drat! :)


我会把它留给SQL大师深入查询。但与此同时,您是否可以尝试在那里进行的各项测试?例如,一个人说 qryPanasonicShirtCheckNew2。[员工编号])是空的 - 您是否可能意外删除了一些空值?也许将它们更新为零? (这不是一回事。)


只是为自己说话,我肯定会怀疑加入。

Drat! :)

I''ll leave it to the SQL gurus to go into the query in depth. But in the meantime, could you maybe try out the individual tests that are being performed in there? For example, one says qryPanasonicShirtCheckNew2.[Employee Number]) Is Null - is it possible you have accidentally removed some null values? Maybe updated them to zero? (It''s not the same thing.)

Just speaking for myself, I definitely would suspect the joins.


这篇关于我的查询似乎没有提取所有可能的记录。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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