Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL error
Message
 
 
To
02/06/2003 20:22:17
Seth Maxwell
Prospect Information Network
Daytona Beach, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00795477
Message ID:
00795521
Views:
12
FoxPro doesn't allow to use expression in the order by clause if it doesn't evaluates to the column number. You can add that expression to the column list and than sort on it.
SELECT *, LEFT(matchtype, 1) AS SortMT1 ;
  FROM _cdarest ;	
  WHERE !DELETED() ;
  GROUP BY prospectid, clinkflag, addr_num, predir, addr_name, addr_unit ; 
  ORDER BY confirmed, SortMT1 ;
  INTO TABLE _uniq
>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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform