Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's wrong with this index syntax
Message
From
20/02/2008 20:07:30
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
20/02/2008 20:01:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01294555
Message ID:
01294557
Views:
13
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform