关于在Access中使用带有Memo字段类型的UNION查询的问题
点击次数:49 次 发布日期:2008-11-27 18:44:22 作者:源代码网
|
源代码网推荐
源代码网整理以下
我使用UNION将包含MEMO类型的查询语句联合起来查询,在我机子的Access中使用没有问题,而在同事的机子使用却不行,提示UNION不能包含Memo类型,我真是晕过去了,有人知道原因码?最好是能够将解决办法告知,谢谢
---------------------------------------------------------------
When you run a SQL-specific union query that contains an OLE Object field, you may receive the following error message:
Can"t use Memo or OLE object field <fieldname> in the SELECT clause of a union query.
Cause
By default, union queries implicitly sort the data and delete duplicate records. Because Memo and OLE Object fields cannot be sorted, the error occurs.
Resolution
To avoid this error, add the ALL predicate to eliminate the sorting of the field data. For example, add the ALL predicate to the following SQL statement
SELECT DISTINCTROW Employees.[LastName], Employees.Photo
FROM Employees
UNION
SELECT DISTINCTROW Employees.[LastName], Employees.Photo
FROM Employees;
to produce the statement:
SELECT DISTINCTROW Employees.[LastName], Employees.Photo
FROM Employees;
UNION ALL
SELECT DISTINCTROW Employees.[LastName], Employees.Photo
FROM Employees;
Note that the SQL statement with the ALL predicate does not remove duplicate records.
NOTE: The [LastName] field in the above example should be [Last Name] in version 2.0.
References
For more information about union queries, search the Help Index for "union queries," or ask the Microsoft Access 97 Office Assistant.
Additional query words: querying can t use memo or ole object field
Keywords: kberrmsg kbusage
Issue Type: kbprb
Technology: kbAccessSearch kbAccess200 kbAccess97 kbAccess97Search kbAccess95Search kbZNotKeyword3 kbAccess700
源代码网供稿. |