Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Match program problem
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00616214
Message ID:
00616362
Vues:
22
Hi Peter,

I don't understand fully what you're trying to do but here's the code that should be close to what you want
select mastrfil

scan
	scatter memvar

	if mod(recno(),1000) = 0
		wait window nowait transform(recno()/reccount()*100,"999.999%")
	endif

	DO CASE
	CASE seek(branch+zip+address2+name1+name2,"trans")
		if empty(trans.match)
			replace trans.match with "O"
			m.match="O"
		endif
	CASE seek(branch+zip+address2+name2+name1,"trans")
		if empty(trans.match)
			replace trans.match with "D"
			m.match2 = "D"
		endif
	CASE SEEK(branch+zip+address2)
		m.match2="X"
	OTHERWISE
		m.match2= " "
	ENDCASE

	select mastrfil
	gather memvar
endscan
There's no need to create new index every time you need one. You can create them in advance using ADDITIVE clause and switch them when appropriate using SET ORDERT TO.
You can also seek on the part of index key (beginning of the key). You don't need separate index for that either.

>Hi all:
>
>I have a program here that looks for exact name and address --- comparing name1/name2 or name2/name1. If I find a match I tag the records . The problem I am having is I want to tag all that matches that where found by address and tag them differently, so I can report on them. Can anyone help...
>
>
>Thanks
>
< snip >
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform