Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group By missing or invalid?
Message
De
29/11/2005 14:10:16
 
 
À
29/11/2005 14:06:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Divers
Thread ID:
01072942
Message ID:
01072946
Vues:
17
This message has been marked as the solution to the initial question of the thread.
>I get the above message with the following sql statement:
>
>
>  SELECT MAX(trackrcd.date), ALLTRIM(trackrcd.t_s_num) FROM trackrcd ;
>	WHERE ALLTRIM(trackrcd.client_id) == thisform.idclient AND;
>	ALLTRIM(trackrcd.prjt_num) == thisform.idproj AND ;
>	ALLTRIM(trackrcd.task_num) == thisform.idtask ;
>	INTO ARRAY datearray
>
>
>Anyone know why? This is not a group by situation.


Because of MAX()
Aggregate functions require grouping. Would not make sense otherwise (ANSI).

Also, returning ALLTRIM(trackrcd.t_s_num) may give you incomplete results as VFP will return a field length based on the length of the first item found. Try PADding it or in VFP9 using CAST().


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform