[dba-SQLServer] Parse name field

John W. Colby jwcolby at colbyconsulting.com
Fri Oct 8 10:06:35 CDT 2004


LOL.  Assume nothing.

As a starting point, assume the name is in the format "Title (if they want
to display it) FirstName SPACE MiddleInitial(if Any) SPACE LastName"  This
is data entered directly by the person owning the name so it can have titles
if they love showing off their doctorate or judgeship.

It seems that all you can assume is that the last name is the last word.
Even that breaks down for the Micks and Macs and the likes.

I know this is not a trivial thing to do as I was involved in ProperCase
wizard on my site.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur
Fuller
Sent: Friday, October 08, 2004 10:46 AM
To: dba-sqlserver at databaseadvisors.com
Subject: Re: [dba-SQLServer] Parse name field


John W. Colby wrote:

>Does anyone have a SP (or whatever) that can parse a single field with 
>first / middle / last name into separate fields?
>
>John W. Colby
>www.ColbyConsulting.com
>
>
>_______________________________________________
>dba-SQLServer mailing list
>dba-SQLServer at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
>http://www.databaseadvisors.com
>
>
>  
>
This wouldn't take long to write, but first let's get the requirements 
straight....

Assume the delimiter is a space?
Assume that if there is only one space, then there is no middle name? Assume
that if there are more than two spaces, the person has two middle 
names?

Yay or nay?

A.
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com







More information about the dba-SQLServer mailing list