Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do while problem
Message
From
03/06/2005 03:20:16
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01019676
Message ID:
01019699
Views:
20
Dear Sir,

One other solution

The following command work fine but very slow
Please modfiy to increase speed
SELECT VOUCHERS
INDEX ON DTOC(DATE,5)+STR(VOU_NO, 5)+ALLTRIM(VOU_TYPE) TO VOUCHERS1

SELECT vou_sum
INDEX ON DTOC(DATE,5)+STR(VOU_NO, 5)+ALLTRIM(VOU_TYPE) TO VOU_SUM1

SELECT VOUCHERS
REPLACE all d1 with ""

SELECT vou_sum
GO Top
DO While !Eof()

	AA=Date       && date type
	bb=VOU_NO    && numeric type
	cc=Alltrim(VOU_TYPE)&& character type
	dd=d1
	
	SELECT VOUCHERS
	LOCATE For Date=AA And VOU_NO=bb And Alltrim(VOU_TYPE)=cc
	IF Found()
		REPLACE all d1 With dd For Date=AA And VOU_NO=bb And Alltrim(VOU_TYPE)=cc
	ENDIF
	SELECT vou_sum
	Skip
ENDDO
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform