>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.
--sb--