Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid key lenght
Message
De
25/02/1997 14:41:05
 
 
À
25/02/1997 14:27:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00021912
Message ID:
00021996
Vues:
42
>>I'm assuming that you are looking for different records with the same address1 AND address2.
>>
>>Try
>>SELECT ADDRESS1,ADDRESS2,COUNT(*) ;
>> from DONOR;
>> group by ADDRESS1,ADDRESS2;
>> order by 3 DESC;
>> into cursor temp
>>
>>This will give you all the Address1's and Address2's and their respective counts in the DONOR table. The order by just makes it easier to look at what kind of numbers you have.
>>
>>Perhaps I'm not quite understanding what you are trying to do, but your second query is really not needed. You have your duplicate addresses and how many duplicates of each pair in the cursor temp.
>>
>>

>I need the second Select, because I need to list out the duplicated record one by one to the user.

Ah...ok...

Then how 'bout...

SELECT {Whichever fields from DONOR you need},;
TEMP.address1,TEMP.address2;
From donor,temp;
where donor.address1 = temp.address1;
AND donor.address2 = temp.address2;
AND temp.cnt > 1;
into cursor result

Sometimes I've found that Fox really, really, REALLY wants fields from both tables in the selection criteria.

Also, is DONOR indexed on an ALLTRIM() of either fields?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform