Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fix tricky Surnames

Status
Not open for further replies.

JackBurton07

IS-IT--Management
Oct 17, 2007
75
GB
Hi I want to write a query that will fix names with apostrophes like O' and Mc
For example I want to :

Convert all surnames in my table beginning with “O Name” to “O’ Name“.

I also want to fix all surnames beginning with “McName” to “Mc Name” (where Name represents a surname).

Help!
 
Perhaps:

Code:
Update tblTable
Set NameField=Replace([Surname],"O ","O' ") 
WHERE ((Left([Surname],2)="O "))

And similar for Mc.

As an aside, are you aware that in Irish it is O <space> not O' ? Some people are upset by the apostrophe.

 
What are you going to do with John Macking and his friend Ian MacGregor?

And I'm sure that Jack Ogden will want to know what happens to Omar al-Khayyam...

You get the point.

 
BigRed1212

The JackBurton07 mentions "O Name", that is, O <space>, so Ogden and Omar will not be affected, similarly, MacGregor etc will not be affected by replacing Mc with Mc<space>. However, Lughaidh Ó Clérigh may be annoyed.
 
However, Lughaidh Ó Clérigh may be annoyed.

LOL. Yes.

Omar wasn't an O example, though. He was an al(space) vs al- vs al(nospace) example. Or el.

My point was more along the line that everybody has seen Oname, O'name, McName, Mc Name, Mc'Name, etc., etc. People spell their names like they want to spell their names. If I'm a proud McName I don't want to be converted to a lowly Mc Name. Grin.

But we drift.
 
BigRed1212

You are right, however, I recall meddling with surnames in just such a way in order to check capitalization.
 
That's a whole 'nuther kettle where you get to bring in good Dutch names like:

Adrianus van der Brugge

where the van der is definitely not capitalized nor written as vander.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top