记录不一致的数量-只改变是排序。
I have an Access 2003 database with a query that is a left outer join of a table to another query. If I didn't sort that final query, I got 42 records. If I sorted the final query by the 2 joined fields, I got 43 records. No other changes were made to the query.
我有一个Access 2003数据库,其中一个查询是一个表的左外连接到另一个查询。如果我没有对最后的查询进行排序,我得到了42条记录。如果我将最后的查询按2个已连接字段排序,我得到43条记录。没有对查询进行其他更改。
To verify this, I took the query, copied it, applied the sort with no other changes, and the record count went up by one. Perplexed, I copied the results into Excel, sorted, and compared row by row. I discovered one record was duplicated (all fields were exactly the same), where there were actually no duplicate records in the source table and query.
为了验证这一点,我使用查询、复制查询、不做任何更改应用排序,记录计数增加了1。我很迷惑,把结果复制到Excel中,排序,逐行比较。我发现有一条记录是重复的(所有字段都完全相同),源表和查询中实际上没有重复的记录。
I would think this is a bug, and I know there are a few in Access, but has anyone heard of this behavior before?
我认为这是一个错误,我知道有一些访问,但是有人听说过这种行为吗?
2 个解决方案
#1
3
It is possible that you have a corrupt index. It may be worth taking a back up and then compacting and repairing the database, which should rebuild the indexes.
您可能有一个损坏的索引。备份和修复数据库可能是值得的,数据库应该重新构建索引。
更多相关文章
- PHP基础教程十四之使用MySqli操作数据库
- mysql关键字与表名字段相同的解决方法
- Java向MySQL数据库插入时间类型Date数据时需要注意的问题
- Sailsjs Mysql ORM在同一个表字段上进行多次查询
- 第15天(就业班) 课程回顾、mysql安装、管理数据库、管理表、增删
- oracle --sql--转换表字段日期格式(年月日时分秒转换年月日)
- Mysql数据库学习笔记(一)
- vs2010下vc调用sqlite3数据库以及配置
- 一个mysql数据库的问题啊,我都摸索两天了,还没解决,今天再不搞定