Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax error in 9 that works in 7
Message
 
 
À
16/09/2005 13:09:57
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01050380
Message ID:
01050393
Vues:
21
>This line of code works in VFP 7 but causes an error in VFP 9. What's the problem?
>
>select distinct(make) as make from car_type into cursor ccar_type order by make
>
>The error is 1808 - Message= SQL: ORDER BY clause is invalid.

Calvin,

You cannor reference column that is not included in the select list in the ORDER BY clause. In case when column alias is the same as a table filed, the table field takes precedence.
In your case you don't need parenthesis around the column name because DISTINCT is a clause not a funtion.
select distinct make from car_type into cursor ccar_type order by make
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform