Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: Roy Slough
  Where is Roy Slough?
 Potters Bar
 United Kingdom
 Roy Slough
 Tags
Subject: RE: Name string not working in SQL
Thread ID: 345266 Message ID: 345601 # Views: 34 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Thursday, May 24, 2012 8:08:37 PM         
   


> e.g. some people have no middle name some have multiple (even six, seven or more!!!)
> some people only quote initials and in strict terms an initial is not the same data as a name.
> Some cultures have surname or family name first then followed by their own personal name(s)
>

As you say, the location of the surname can vary depending on the culture. But your query does not exactly extract the surname. It extracts the last word of the name. So you might instead of calling it surname, call it the last name and put it in another column. A GETWORDNUM(.... , GETWORDCOUNT( )) is quite a slow function.

Regards
Tushar
http://weblogs.foxite.com/tushar/

ENTIRE THREAD

Name string not working in SQL Posted by Roy Slough @ 5/21/2012 9:30:37 PM
RE: Name string not working in SQL Posted by Anders Altberg @ 5/22/2012 2:29:49 AM
RE: Name string not working in SQL Posted by Roy Slough @ 5/22/2012 9:26:01 AM
RE: Name string not working in SQL Posted by Anders Altberg @ 5/22/2012 11:43:01 AM
RE: Name string not working in SQL Posted by Mike Yearwood @ 5/22/2012 3:49:58 PM
RE: Name string not working in SQL Posted by Roy Slough @ 5/22/2012 4:02:45 PM
RE: Name string not working in SQL Posted by Mike Yearwood @ 5/22/2012 8:21:17 PM
RE: Name string not working in SQL Posted by Roy Slough @ 5/24/2012 8:48:35 AM
RE: Name string not working in SQL Posted by Mike Yearwood @ 5/24/2012 4:59:18 PM
RE: Name string not working in SQL Posted by tushar @ 5/24/2012 8:08:37 PM
RE: Name string not working in SQL Posted by Samir Ibrahim @ 5/30/2012 9:05:13 PM