Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
An SQL Challenge (it's a challenge for me anyway)
Message
De
22/10/1997 11:58:14
 
 
À
22/10/1997 10:31:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00055877
Message ID:
00056051
Vues:
35
>>>I need to find potentially duplicate records in my membership database. The search needs to do the following:
>>>Look at all records with a system assigned ssn (our system assigned numbers start with "000") and compare them to all other records to check for people with the same last name living in the same city. I have created a subset table containing only the records with system assigned ssns, but I am sort of scratching my head as to what to do next. The main table is unavailable to me for esclusive use... should I copy it in order to create additional indexes to search on? Is there a single SQL statement that would take care of this? Thanks in advance for any help.
>>
>>How about
>>
>>Select ssn,lastname,firstname,city,count(*);
>> from memberfile;
>> group by ssn,lastname,city;
>>into cursor cntmem
>>
>>??
>
>Thanks Dorris, but this won't work because the records I am looking for don't have the same ssn, but one will always have a ssn starting with "000" and the other will have a real one.

Then remove 'ssn' from the criteria and start from there. Quite often, starting with something like this and looking at the results will lead you where you need to be.
"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
Répondre
Fil
Voir

Click here to load this message in the networking platform