Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's wrong with this index syntax
Message
De
20/02/2008 20:07:30
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01294555
Message ID:
01294557
Vues:
11
Rajani, find the records with the duplicate names. ;-)

I can't test it, but try something like
select padr(trim(upper(surname))+trim(upper(firstnames)),100) as cName, count(*) as cnt from mytable ;
   where internal=1 ;
   group by 1 order by 1 ;
   having cnt>1
The padr() is to ensure you get the whole name value rather than a truncated version.

Also, consider adding a [ ] between the trimmed names in the index- to preserve the first name/last name distinction.
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform