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