ACC: Limit on ANDs in SQL Select Statement
ID: Q92690
|
The information in this article applies to:
-
Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97
Moderate: Requires basic macro, coding, and interoperability skills.
There is an undocumented limit on the number of ANDs that you can use in a
SQL Select statement. The limit is 40 ANDs in a WHERE clause and 40 ANDs in
a HAVING clause.
Microsoft Access 1.x returns the following error message when you exceed
this limit:
Out of Memory
Microsoft Access 2.0, 7.0 and 97 return the following error message when
you exceed this limit:
Query is too complex
Keywords : kberrmsg kbusage QryProb
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 12, 1999