SQL Shortcut

B

briank

Currently I have a query that is over 9,600 characters
long and Access won't process it. Is it possible to
substitute a short name in place of a long table name in
the SQL section of this query?
 
V

Van T. Dinh

An Access / JET SQL String can be up to 64K characters.
However, there are some other limits when you use the GUI
Query Grid. Type "Specification" in the Help Search Field
for these limits.

Sure. You can use aliases to shorten the SQL String.
Something like:

SELECT T.Field1, T.Field2, T.Field3, ...
FROM TableWithAVeryVeryLongName AS T

HTH
Van T. Dinh
MVP (Access)
 
R

Robert Clarke

Why not chain a series of queries (I don't know how many you can do) but it
would also help you debug the query.

ie
SELECT * from customers into query1 where name like$('A')
SELECT * from query1 where birthdate > #01/02/99#
etc

Rob
 
V

Van T. Dinh

"... (I don't know how many you can do) ..." : exactly ... ONE.

Access Query can only contain 1 SQL statement (which can include statements
for subqueries) but not multiple statement like you suggested.
 

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

Top