Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax error in 9 that works in 7
Message
 
 
To
16/09/2005 13:09:57
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01050380
Message ID:
01050393
Views:
13
>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--
Previous
Reply
Map
View

Click here to load this message in the networking platform