What's the Limit of SQL-expresssions in Queries

G

Guest

What's the Limit of the length of SQL-expresssions in Queries?
I made an SQL-statement which runs but the result isn't correct.
Yes i've tripple-checked the syntax.
I'm using Access 2000 (sp3) and the length of the SQL-statement is about
4167 characters. Yes I've tried to use concatinated queries but they give
wrongs results as well.
Thanks In Advance
 
V

Van T. Dinh

The length of the SQL can be up to 64K characters. However, if you use the
QBE grid there are more limits on the individual "boxes" in the grid (1024
characters, IIRC).

Check "Specidications" in Access Help.

If you use Table qualifiers in the Query, you may want to use aliases to
shorten your SQL to make it more readable. For example:

SELECT T1.Field1, T1.Field2, T2.Field3
FROM [MyFirstTableWithVeryLongName] AS T1 INNER JOIN
[MySecondTableWithAnotherVeryLongName] AS T2
ON T1.Field1 = T2.Field1
 
G

Guest

Sorry it still doesn't work. I solved it through using temporarly tables.
Thanks anyway.

"Van T. Dinh" skrev:
The length of the SQL can be up to 64K characters. However, if you use the
QBE grid there are more limits on the individual "boxes" in the grid (1024
characters, IIRC).

Check "Specidications" in Access Help.

If you use Table qualifiers in the Query, you may want to use aliases to
shorten your SQL to make it more readable. For example:

SELECT T1.Field1, T1.Field2, T2.Field3
FROM [MyFirstTableWithVeryLongName] AS T1 INNER JOIN
[MySecondTableWithAnotherVeryLongName] AS T2
ON T1.Field1 = T2.Field1

--
HTH
Van T. Dinh
MVP (Access)




skumberg said:
What's the Limit of the length of SQL-expresssions in Queries?
I made an SQL-statement which runs but the result isn't correct.
Yes i've tripple-checked the syntax.
I'm using Access 2000 (sp3) and the length of the SQL-statement is about
4167 characters. Yes I've tried to use concatinated queries but they give
wrongs results as well.
Thanks In Advance
 

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