Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP60-Data search
Message
De
05/01/2000 13:11:54
 
 
À
05/01/2000 12:22:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00313300
Message ID:
00313351
Vues:
34
>I have tableA with thousands of records.
>I have tableB with just a few records.
>I need to grab a WHOLE record in tableB and and search for that WHOLE record in tableA.
>
>Is there an easy way to search for a WHOLE record in another table? Each record has 70+ fields.
>
>Any comments will be welcome. Thank you in advance.

I don't know an easy way... a hard way is:
scatter tableb
lfound = .t.
select tablea
scan
    for nfieldcnt = 1 to fcount()
         cfielda = "tablea." + field(nfieldcnt)
         cfieldb = "m." + field(nfieldcnt)
         if eval(cfielda) # eval(cfieldb) then
             lfound = .f.
         endif
    next
    if lfound then
       * got a match
       exit
    else
        lfound = .t.
    endif
endscan
if lfound then
    * found match processing
else
    * no match processing
endif
--Todd Sherman
-Wake Up! Smell the Coffee!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform