Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL: ORDER BY clause is invalid
Message
De
02/04/2005 15:59:23
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Novell 5.x
Database:
Visual FoxPro
Divers
Thread ID:
01000629
Message ID:
01001014
Vues:
39
>>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform