>I'm trying to do a SQL select statement through VFP but keep getting the error message SQL: 'Column 'confirmed' is not found'. The field 'confirmed' does exist in my table and the table is open, the alias is right. I don't understand what's wrong. Is confirmed a reserved word in SQL? Should I just change the field name? Here is the exact code that generates the error:
>
>SELECT * ;
>FROM _cdarest ;
>WHERE !DELETED() ;
>GROUP BY prospectid, clinkflag, addr_num, predir, addr_name, addr_unit ;
>ORDER BY confirmed, LEFT(matchtype, 1) ;
>INTO TABLE _uniq
>
>Thanx, SETH
I suspect that the
other part of the ORDER BY is causing trouble. I think you can only use fieldnames here, not any expression.
Try to eliminate parts of the SQL statement, until it works (or start with a basic statement, and add parts until it doesn't work).
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)