SQL Shortcut

  • Thread starter Thread starter briank
  • Start date Start date
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?
 
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)
 
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
 
"... (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.
 
Back
Top