Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Scottish names
Alan -
Works fine:
acdb. select initcap('o''brien') from dual;
INITCAP
Carla
"Alan" <alanshein_at_erols.com> wrote in message
news:afd61q$demmv$1_at_ID-114862.news.dfncis.de...
> Yes. Users must enter a space after the Mc or Mac, or Di or De or di or
de,
> etc. Then initial caps works. Now solve the O' problem.
>
> "Charlie Edwards" <Charlie3101_at_hotmail.com> wrote in message
> news:db479d88.0206260650.77e28a7b_at_posting.google.com...
> > OK, here's a good one ...
> >
> > I am developing a system which has data inputs from many legacy
> > systems. One of the fields is 'Name'. This can be 'MR PAUL SMITH',
> > 'Mr P Smith', 'PAUL J SMITH' - pretty much anything (yuck).
> >
> > Now a requirement is to have the name in 'proper name' case. "Pah" I
> > hear you cry collectively, "use INITCAP you moron". All very well and
> > good, except when we come across our friends of Scottish ancestry.
> >
> > I need to write a routine that allows for 'Mac's amd 'Mc's, which is
> > not as straightforward as it first seems.
> >
> > You don't want 'MACE' being translated to 'MacE', for example, nor
> > 'Macken' to 'MackEn'.
> >
> > The general rules are
> > o Always capitalise after 'Mc'
> > o Only capitalise after 'Mac' if the string is >= 6 characters
> > o Don't capitalise the k in 'Mack...'
> > o Allow for some specific exceptions (e.g. MacKendrick)
> >
> > So has anyone ever done anything like this. I'll go ahead and do it
> > myself, it just strikes me as something someone else may have done
> > before.
> >
> > Thanks,
> >
> > CE
>
>
>
Received on Wed Jun 26 2002 - 15:01:52 CDT
![]() |
![]() |