problem with long queries in MS Query

S

stillman

I have a spreadsheet that I developed on a PC using the Windows
version of Query. When I open it and do edit query, it says that the
syntax is bad and everything below a certain point in the query is
garbage characters. I open the original query in BBEdit, copy it over
to Query, and hit test. It returns the data fine, and it also
populates the spreadsheet fine when I tell it to return the data. But
if I immediately go to edit query again, I get the same garbage
characters, starting at the same point in the query as when I
originally opened it, plus all the line breaks are gone. If I
rearrange some of the joins, the query still works when I first copy
it over from BBEdit, but when I go back to edit the query, it has
garbage at the bottom again, only this time it starts in a different
place.

So it appears that there is some sort of length limit on queries (the
query I'm working on is fairly long with a large number of joins and
where statements). I have tried opening my raw query with multiple
text editors, removing line breaks, etc., and I come up with the same
results every time. It looks like the problem happens when Query
itself saves the query and does some reformatting. Has anyone else
encountered this? Is there a workaround?
 
J

Jim Gordon MVP

Hi,

Can you post the query?

-Jim

I have a spreadsheet that I developed on a PC using the Windows
version of Query. When I open it and do edit query, it says that the
syntax is bad and everything below a certain point in the query is
garbage characters. I open the original query in BBEdit, copy it over
to Query, and hit test. It returns the data fine, and it also
populates the spreadsheet fine when I tell it to return the data. But
if I immediately go to edit query again, I get the same garbage
characters, starting at the same point in the query as when I
originally opened it, plus all the line breaks are gone. If I
rearrange some of the joins, the query still works when I first copy
it over from BBEdit, but when I go back to edit the query, it has
garbage at the bottom again, only this time it starts in a different
place.

So it appears that there is some sort of length limit on queries (the
query I'm working on is fairly long with a large number of joins and
where statements). I have tried opening my raw query with multiple
text editors, removing line breaks, etc., and I come up with the same
results every time. It looks like the problem happens when Query
itself saves the query and does some reformatting. Has anyone else
encountered this? Is there a workaround?
 

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