Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Roy Slough
  Where is Roy Slough?
 Potters Bar
 United Kingdom
 Roy Slough
 To: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 Tags
Subject: RE: Name string not working in SQL
Thread ID: 345266 Message ID: 345325 # Views: 39 # Ratings: 0
Version: Visual FoxPro 8 Category: Databases, Tables and SQL Server
Date: Tuesday, May 22, 2012 4:02:45 PM         
   


>
> I would not store first, middle, last in a single field. Use Anders' idea to move lastname to a new column. You can always combine strings to display.
>
> Mike Yearwood
> Microsoft MVP Visual FoxPro 2008, 2009

Thanks Mike,

Yes I had thought about that, indeed the database I am importing from has separate fields for Title Initials and Surname.
Same as Address - Original source has addr1 addr2 addr3 addr4 but I am using a memo field and checking during input that the total number of characters and number of CR LF is kept to a reasonable limit (for printing etc.)

Historically I have found that given extra fields for name, on occasion the user will type the wrong item in (e.g last name in middle name box. or Title in first name box etc.)or that I get feedback about more middle names being required, And/Or some users go to the last line of address and put county in there others just use last blank addr field.
Altogether these mixed input styles call for extra headaches when printing.

Really the only piece of data I can envisage needing isolated is the surname (for sorting lists etc.) and the two solutions (one using substr() and the other using getword() ) solve this beautifully, so for me a single Name field is more beneficial.

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