Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Do while not eof and scan endscan
Message
 
 
To
24/03/2005 01:02:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
00998758
Message ID:
00998802
Views:
13
This message has been marked as the solution to the initial question of the thread.
It can be done in one command. You may have to provide field list for Insert and Select if table structures don't match.
INSERT INTO kpinx1 ;
	SELECT * FROM kpin ;
	WHERE empty(dtime1) ;
		and (trayout1 <> 0 or trayout2 <> 0 or trayout3 <> 0)
>Can someone please tell me why I should get two different answers using
>"do whil not eof()" and "Scan endscan" as below :
>
>** In this do whil loop, I get 5 records
>select kpinx1
>zap
>select kpin
>go top
>do whil not eof()
>	if not empty(dtime1)
>		skip
>		loop
>	endif	
>	if trayout1 = 0 and trayout2=0 and trayout3 = 0
>		skip
>		loop
>	endif	
>	scatter  memvar
>	INSERT INTO kpinx1 from memvar
>	select kpin
>	skip
>enddo
>select kpinx1
>go top
>brows
>
>*** In this scan loop, I only get 2 recrods
>select kpinx1
>zap
>select kpin
>go top
>scan
>	if not empty(dtime1)
>		skip
>		loop
>	endif	
>	if trayout1 = 0 and trayout2=0 and trayout3 = 0
>		skip
>		loop
>	endif	
>	scatter  memvar
>	INSERT INTO kpinx1 from memvar
>	
>endscan
>select kpinx1
>go top
>brows
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform