Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Very slow result in report
Message
From
12/02/2005 12:11:26
 
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00985559
Message ID:
00986296
Views:
32
>Fabio
>thanks for your helpful reply, your codes is very.......very faster than mine.
>thanks

TRY THIS, IT IS FASTER ?
SELECT 6
Set Order To CODE
Set Filter To BETWEEN(code,m.codefm,m.codeto) AND admtd=1 .and. BETWEEN(aattend,m.aattendfm,m.aattendto)
LOCATE
if found()
	UPDATE (ALIAS(6));
		SET pattend = codeSum.nCode;
	,	aattend = codeSum.nCodeP;
	,	attend	= NVL(100*codeSum.nCodeP/EVL;(codeSum.nCode,NULL),0)
		FROM (ALIAS(6)) A6 				;
			JOIN (SELECT 				;
				code				;
	     		,	CAST(COUNT(*) AS I) 	nCode ;
			,	CAST(COUNT(CAST(EVL(category="P",NULL) AS L)) AS I)	nCodeP;
					FROM ALIAS(11);
					WHERE	date	BETWEEN m.attendfm  and m.attendto;
						AND code	BETWEEN m.codefm    and m.codeto;
					GROUP BY 1) codeSum;
			ON codeSum.code=A6.code;
		WHERE admtd=1 && .and. BETWEEN(aattend,m.aattendfm,m.aattendto) YOU CAN ADD THIS IF IT IS NECESSARY
     Select 6
     LOCATE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform