to parse the Contact field with FirstName LastName values and put them in the respective fields FName, LName
Update tableX
Set FName=Trim(Left([Contact],
LName=Trim(Mid([Contact],I
to remove the Mr.mrs, ms. you can use a replace function
update tableX
set [contact]=replace(replace(
run this first before parsing the contact field
Main Topics
Browse All Topics





by: leewPosted on 2009-10-20 at 08:16:47ID: 25615048
When you don't know, it's not easy. Make a backup of the database
I would run a series of SQL statements with replace:
Update TableName Set Contact = Replace(Contact, 'Mr. ', '')
Update TableName Set Contact = Replace(Contact, 'Mrs. ', '')
Update TableName Set Contact = Replace(Contact, 'Ms. ', '')
Update TableName Set Contact = Replace(Contact, 'Dr. ', '')
Update TableName Set Contact = Replace(Contact, 'Mr ', '')
Update TableName Set Contact = Replace(Contact, 'Mrs ', '')
Update TableName Set Contact = Replace(Contact, 'Ms ', '')
Update TableName Set Contact = Replace(Contact, 'Dr ', '')
etc
(It's important that you include the space following the salutation - skipping it will result in Mr. John Drake looking like Mr. John ake)