Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need help comparing two tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00386341
Message ID:
00386361
Vues:
18
Build UDF that generates a string from all the fields i.e:
****
function mifuncion
private cadena
cadena=""
cadena=cadena+iif(myfield01,"1","0")
cadena=cadena+iif(myfield02,"1","0")
cadena=cadena+iif(myfield03,"1","0")
cadena=cadena+iif(myfield04,"1","0")
cadena=cadena+iif(myfield05,"1","0")
....
cadena=cadena+iif(myfield24,"1","0")
return cadena
******

index your table2 like this:
index on mifuncion() to table2
after that, edit a prg with this:
*****
use table1 in 0
use table2 index table2 in 0
select table1
go top
k=0
micadena=""
do while !eof()
micadena=mifuncion()
select table2
seek micadena
if found()
k=k+1
endif
select table1
skip
enddo
wait wind "There are "+str(k)+" Coincidences"

********
Hope this help.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform