Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By Example in VFP 8
Message
From
22/07/2004 09:25:30
 
 
To
21/07/2004 18:19:25
Luis Navas
Independent Consultant
Auckland, New Zealand
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00926827
Message ID:
00926972
Views:
10
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	
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform