View Full Version : Union Query Error "Not a valid alias name."


Busto
05-27-2002, 10:38 AM
I found two other postings on this problem, but neither of them had a posted solution. I am trying to create a union query that joins 21 tables together. Parts of it were working fine, but the completed query doesnt work. It just gives me the error "Not a valid alias name" when i try to view it in a datasheet. I have no clue whats wrong with it because, as i said before, individual parts of it work just fine. I have tried taking out different tables to see if it would work, and no matter which table is omitted it works fine. Why does every combination of 20 tables (i tried about 10)work, but they wont work when put together?

llkhoutx
05-27-2002, 11:27 AM
Sounds to me like there's a limit.

Just break your union query into two union queries.

Sometimes it's earsier to build a "work around" rather than "solve the problem." The time difference is insignificant, pl;us you may see an improvement. I've found that multiple small queries are substantially faster that one monster query with lots of joins. However, I've never tried or needed to joi as many queries as you.

I had a manager years ago who said, "There's a difference between getting the job done right and getting the right job done. We want to get the job done right."

Busto
05-27-2002, 03:54 PM
I took your advice, and it should work just fine. I guess there is some sort of a limit.

Thanks
John