Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL error
Message
 
 
À
02/06/2003 20:22:17
Seth Maxwell
Prospect Information Network
Daytona Beach, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00795477
Message ID:
00795521
Vues:
13
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform