Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bach delete
Message
From
13/08/2003 08:26:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Bach delete
Miscellaneous
Thread ID:
00819727
Message ID:
00819727
Views:
34
I have table with 3 million lines and I have to delete about 2 million from this - based on other table with 200000 lines.
in the following example I want to delete 'table4' (grandson of grandson of table 'deleteid')
The example working but it's very slow, there is a way to rush it?
select deleteid
scan
	select table1
	if seek (deleteid.myid,'table1','myid')=.f.
	loop
	endif
	scan while deleteid.myid=table1.myid
		select table2
		if seek (table1.dyid,'table2','dyid')=.f.
			loop
		endif
		scan while table1.dyid=table2.dyid
			select table3
			if seek (table2.id,'table3','table2id')=.f.
				loop
			endif
			scan while table2.id=table3.table2id
				select table4
				if seek (table3.id,'table4','table3id')=.f.
					loop
				endif
				scan while table3.id=table4.table3id
					delet in table4
				endscan
			endscan
		endscan
	endscan
endscan
Thanks in advance
Thank you
Chaim
Next
Reply
Map
View

Click here to load this message in the networking platform