2

Attempting to copy/paste a 159KB TSQL query into Microsoft Access 2010 passthrough query editor (to a Microsoft SQL Server 2008 backend).

This produces pop-up error, "The text is too long to be edited".

What is the maximum length of a query in Microsoft Access 2010?

iokevins
  • 1,427
  • 2
  • 19
  • 29

2 Answers2

7

The help file says that the maximum number of characters in a SQL statement is approximately 64,000. It doesn't mention any difference between pass through queries and other queries, so in the absence of any specific documentation I'm assuming that this also applies to pass through queries.

iokevins
  • 1,427
  • 2
  • 19
  • 29
Dzoki
  • 739
  • 4
  • 14
  • Thanks Dzoki :o) I have edited the question to reflect the more general SQL query – iokevins Oct 08 '11 at 20:27
  • Dzoki, can you specify how you found the 64KB limit in the help file? Keywords, links selected, and so forth. – iokevins Oct 08 '11 at 20:29
  • Number of characters in a Memo field - 65,535 when entering data through the user interface; 1 gigabyte of character storage when entering data programmatically --> [read here](http://office.microsoft.com/en-us/access-help/access-2010-specifications-HA010341462.aspx) – Dzoki Oct 08 '11 at 20:32
  • Thank you: "Number of characters in an SQL statement: Approximately 64,000. (Maximum values might be lower if the query includes multivalued lookup fields.)" – iokevins Oct 08 '11 at 21:06
2

Looking for this myself and found another limitation that is more likely to be your problem as well as mine:

Maximum number of JOINS in a query: 16

Maximum number of nested queries: 50

  • Why would this represent the problem for a passthrough query? I presume Microsoft Access just passes along the text to the backend database engine? – iokevins Jan 27 '13 at 01:28