[AccessD] Back in the saddle
John Colby
jwcolby at gmail.com
Fri Apr 19 22:43:52 CDT 2024
I seem to remember doing this with a database of names. I'm thinking a
table of first names, and a table of last names. All hashed. Start
splitting off pieces and hashing the pieces then trying to look them up. I
do remember that the last name thing was indeed tricky since there are all
kinds of issues with names from other languages. De Uriarte, Van Der
Slagen etc. It is not trivial. I ended up buying a database of names
IIRC. But I had a client that really needed this done right. The cool
part is that the db had an ethnicity code to guestimate what the ethnicity
was for analysis purposes.
On Fri, Apr 19, 2024 at 11:33 PM Stuart McLachlan <stuart at lexacorp.com.pg>
wrote:
> Good luck with that. Names are tricky.
> Vincent Van Gogh.
> Titus von der Malsburg
>
> That said, this is not too bad:
>
> Function NameParts(fullname As String) As String
> Dim p1, p2 As Long
> Dim firstname, middlename, lastname As String
> While InStr(fullname, " ")
> fullname = Replace(fullname, " ", " ")
> Wend
> p1 = InStr(fullname, " ")
> If p1 > 0 Then
> p2 = InStrRev(fullname, " ")
> firstname = Left$(fullname, p1 - 1)
> lastname = Mid$(fullname, p2 + 1)
> If p1 <> p2 Then middlename = Trim$(Mid$(fullname, p1 + 1, p2 - p1 - 1))
> Else
> lastname = fullname
> End If
> Debug.Print "CleanName: " & firstname & " " & middlename & " " & lastname
> NameParts = "Name Parts: " & firstname & "|" & middlename & "|" & lastname
> End Function
>
>
> On 20 Apr 2024 at 1:00, John Bartow wrote:
>
> > I'm using Access again, after many years away. I'm using it to migrate
> data from one messy cloud based LOB program's data to another messy cloud
> based LOB program. So I'm basically breaking it down to build it back up
> again.
> >
> > I need to compare [client name] (one field) "Joe D. Testguy" to [first
> name] "Joe" [middle name] "D." [last name] "Testguy" concatenated to be one
> field for this purpose. I used to use a function to do this and have the
> result with only 1 space between the 3 parts even if the middle name was
> null. Can one of you gurus refresh my memory as to how this is done?
> >
> > That's the fun part. The drag comes when someone put "Joe D Testguy and
> Jill D Testgal" as the [client name].
> >
> > TIA
> > John B
> >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
--
John W. Colby
Colby Consulting
More information about the AccessD
mailing list