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!

Uppercase for McNames or ONames

Status
Not open for further replies.

Schnappa

Technical User
Jul 27, 2003
58
AU
Hi all

Running CR V11. Need to know if anyone has a solution to the above. Our database (SQL) has surnames that need to have propercase added where appropriate. I have used the PC function to sort out the hyphenated names, but this is the next problem.

Examples include... Mcdonalds should be McDonalds and Obrien should be OBrien.

Is it a case of building a library of examples where this might be the case, then building this as more are found?

Thanks for your help

Gez
 
You could write a formula:

if left({Lastname},2)="Mc" then left({Lastname},2)&Uppercase(Mid({Lastname},3,1))&Mid({Lastname},4)

That would take care of the Mcs, but I do not know how to address the Os as not all names beginning with O are subject to this rule. Is there not an apostrophe in O'Brien?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Thanks Dgillz

Yeh, I had the same answer for the Mc's but realise that there are a lot of different combinations that would have to be thought of to capture everything. Unfortunately, the field is free text, and those that input the information are obviously totally unfamiliar with keeping data clean.

Thanks heaps for helping out.

Gez
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top