>>Sergey, the issue is very simple to understand,
>>the VFP search ORDER by fieldName on tablesource before to search into the SELECT fields list,
>>this is the BUG, they do not serve examples, enough to think;
>>i try to show this to Aleksey, but without happening.
>>
>>However,A simple example is this:
>>
>>CREATE CURSOR test (aa m)
>>SELECT DISTINCT LEFT(AA,1) AS AA FROM TEST ORDER BY 1
>>
>>SELECT DISTINCT .t. AS AA FROM TEST ORDER BY AA
>>
>>CREATE CURSOR test (aa m)
>>SELECT DISTINCT LEFT(AA,1) AS AA FROM TEST ORDER BY 1
>>* BUG
>>SELECT DISTINCT LEFT(AA,1) AS AA FROM TEST ORDER BY AA
>>* if previous has not convinced to you, then
>>SELECT DISTINCT .T. AS AA FROM TEST ORDER BY AA
>>* DISTINCT is insignificant
>>SELECT LEFT(AA,1) AS AA FROM TEST ORDER BY AA
>>* more simple
>>SELECT .T. AS AA FROM TEST ORDER BY AA
>>* if not enough, then not there is hope
>>
>>
>Fabio,
>
>Aleksey explained to you many times that it isn't a bug. A table field takes a precedence over field alias name. Period. I, personaly, don't like that rule either but it doesn't make it a bug. I don't see that there's anything left to discuss. You can submit a whish asking to change this behavior in the next VFP version.
Sergey,
"A table field takes a precedence over field alias name." Who decides that? VFP9 created a rule specific to itself?
It looks like a bug to me. What other VFP version or database system doesn't accept it as a bug. Doesn't make sense to me to create such a rule specific to a single version of a single tool. In the same manner each bug could be explained "it's a specific rule to this version". Out of VFP9 it stands as a bug.
select distinct city,right(Rtrim(city),3) as country ;
from (_samples+'data\customer') myCursor order by country
should not error and the ordering should be right. However the bug was only in ordering in previous versions. Now "if it's giving an error", it's a bigger bug. Period.
Cetin