Limit of query length

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
does anyone know if there is a limit to the length of a query? For instance,
suppose a query like:

Select * From Clients where ClientID IN (strOverseasClients)

where strOverseasClients is a string containing thousands of comma delimited
client IDs. Is there a point where Access will say that the query contains
too many characters to process?

thnks
 
If you search the Access help for "Specifications", you see these limits
(amongst others) for queries:
SQL statement: around 64K characters.
ANDs in WHERE/HAVING clause: 99

No limit is listed for the number of items in an IN phrase. If I understand
correctly, these are treated as array elements, so there should not be a
problem with any index size that is practical within the overall limit of
64k characters in the entire SQL statement.
 
Thanks Allen,

one more thing, does this limitation also applies SQL string when you use
docmd.runsql? or only when you create query through database window?
 
If you use the RunSQL action, I think you are limited to 255 characters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top