ACC: ORDER BYs Must Be Output Columns in DISTINCT Queries (96895)
The information in this article applies to:
- Microsoft Access 1.0
- Microsoft Access 1.1
- Microsoft Access 2.0
- Microsoft Access for Windows 95 7.0
This article was previously published under Q96895
Moderate: Requires basic macro, coding, and interoperability skills.
SYMPTOMS
If you create a query and use the DISTINCT predicate in conjunction
with the ORDER BY clause, the fields that are being ordered must be
output columns. If the ORDER BY fields are not output columns, you
may receive the following error message:
ORDER BY clause ([Table Name].[Field Name]) conflicts with DISTINCT.
RESOLUTION
Use the DISTINCTROW predicate or remove the specified field from the ORDER
BY clause.
REFERENCES
For more information about using SQL predicates, search for "DISTINCT," and
then "ALL, DISTINCT, DISTINCTROW, TOP Predicates (SQL)" using the Microsoft
Access for Windows 95 Help Index.
Modification Type: | Major | Last Reviewed: | 5/9/2003 |
---|
Keywords: | kbprb kbusage KB96895 |
---|
|