Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group By Example in VFP 8
Message
De
22/07/2004 09:25:30
 
 
À
21/07/2004 18:19:25
Luis Navas
Independent Consultant
Auckland, Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00926827
Message ID:
00926972
Vues:
11
Select	Pedidos.Codpai				;
	,	Pedidos.Codven			;
	,	MAX(Maepai.nompai)		;
	,	MAX(Maeven.nomven)		;
	,	MAX(Pedidos.Valpedmn)		;	&& what is this ?
	,	MIN(Pedidos.Fecped)	MinFecped	;
	,	MAX(Pedidos.Fecped)	MaxFecped	;
	,	SUM(Iif(Month(fecped)=1,valpedmn,0)) As enero	;
	,	SUM(Iif(Month(fecped)=2,valpedmn,0)) As Febrero	;
	....
	,	SUM(Iif(Month(fecped)=12,valpedmn,0)) As diciembre ;
Into Cursor (This.lcCursor) ReadWrite	;
From Pedidos ;
Inner Join Maepai On Pedidos.Codpai=Maepai.Codpai
Inner Join Maeven On Pedidos.codven=Maeven.codven ;
Where Pedidos.Fecped Between This.Cajafecha1.Value And This.Cajafecha2.Value;	&& replace This.Cajafecha1... and This.Cajafecha2 with variables
Group By Pedidos.Codpai,Pedidos.Codven	
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform