Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JET Query change "(" to "[" when saved 1

Status
Not open for further replies.

Clipper2000

Programmer
Nov 28, 2004
54
US
Hi,

I have a SQL statement (as below) that works fine when run; however, after I save it and the next time I open the query, Access change the "(" to "[" and added an extra period (".") at the end. ????? why ???? Help please!


Code:
SELECT B.GLM, A.Description, A.Accpac, A.Amount, A.Category, A.Period, A.Year

FROM [tbl90707(Single)] A INNER JOIN (SELECT DISTINCT GLM, Accpac FROM [GLM:ACCPAC]) As B ON
A.Accpac = B.Accpac

WHERE A.Accpac < "40000" AND A.Category <>"CFI" AND A.Period = 11 and A.Year = 2004

Some how Access changed my second select clause to this when saved (note the extra period at the end:

Code:
INNER JOIN [SELECT DISTINCT GLM, Accpac FROM [GLM:ACCPAC]]. As B
 
To avoid this behaviour (bug ?) use a saved query.
Or, with your example:
SELECT DISTINCT B.GLM, A.Description, A.Accpac, A.Amount, A.Category, A.Period, A.Year
FROM [tbl90707(Single)] A INNER JOIN [GLM:ACCPAC] B ON
A.Accpac = B.Accpac
WHERE A.Accpac < "40000" AND A.Category <>"CFI" AND A.Period = 11 and A.Year = 2004

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
You are a very clever person PHV! and you know your JOINs well!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top