Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid key lenght
Message
From
25/02/1997 14:41:05
 
 
To
25/02/1997 14:27:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00021912
Message ID:
00021996
Views:
38
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform