Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
2.6 Duplicate records with a twist
Message
De
05/03/2002 10:35:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
05/03/2002 10:26:21
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00628416
Message ID:
00628424
Vues:
16
>Hello... I'm having problems with my logic here so I was looking for a little help.
>
>I need to search a table for people with the same last name's and same dob. However, the name field is applicant = lname, fname mi. What's the best way to do this???
>
>( I don't want to search by ssn, b/c were looking for people trying to get around the system by using a different ssn and applying at different times)
>
>Thanks,
>Sunshine

You need a GROUP BY. Something like this:
select lname, fname, mi, birthday, count(*) as repeat;
  from people;
  group by lname, fname, mi, birthday;
  having repeat > 1
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform