Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bach delete
Message
De
13/08/2003 08:26:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Bach delete
Divers
Thread ID:
00819727
Message ID:
00819727
Vues:
35
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform