Phil, I'm getting the expected result when I run this in OS X 10.6.8. Er, I had to adjust your ExecuteSQL formula to allow for the two empty parameters that the function requires, but... yeah. I ran it with "order by 1 desc" and "order by Name desc", and both sorted properly. It also worked in a calculation field and in the data viewer. I can't seem to make it fail on my end.
I did forget to include the other parameters when posting here.
Your findings suggest that this is a Windows specific issue here...
Hmmm, just noticed a discrepancy between my test file and what I reported here and it is a factor here--leaving me unsure whether this is a bug or "by design".
My actual union query included where clauses for each table. When I remove the Where clauses to find all values in each table, I then get the sorted, merged list of names that I expected.
But is this really the way it should work? Seems to really limit the utility of a Union query if you can't specify a WHere clause for each table.
More testing to come on this one...
Well scratch this one off the list. I can't replicate today what I reported last week. Those where clauses may have created the illusion that the names were not merged and sorted as a single list.