>>>As someone found the logic of VFP when using a field name DESC in a SQL? Sometimes, the same SQL will generate an error if a field name is Desc. Most of the times it'll work.
>>
>>DESC is a keyword in both VFP-SQL and T-SQL, as in:
>>
>>SELECT Name, City ;
>>FROM Customers
>>ORDER BY Name DESC
>>
>>
>>so I would avoid it as a field name.
>
>Yes, I know. My point was mostly to know why VFP sometimes accept it and sometimes it don't.
The chances are it will get confused if it cannot fully qualify the field name,
so:
select t.desc from t...
or
select * from t order by t.desc
should *always* succeed. I have more than once used reserved VFP keywords as field-names and VFP sometimes complains, but not if the name is qualified.