Re: Parsing data for insert from one table to another

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Tue, 06 Nov 2001 13:31:27 GMT
Message-ID: <PCRF7.26743$Tb.14441222_at_news1.sttln1.wa.home.com>


That's the problem it is pretty consistent not absolutely consistent. How do you want to handle:
Mc Connell , James C
Unless you know all the possible suffixes you cannot distinguish the above from your.
Using your rules the name would parse as Last Mc
Suffix Connell
first James
Middle C

Jim
"Chris" <chris_self_at_yahoo.com> wrote in message news:52f2f187.0111060336.1983b2fa_at_posting.google.com...
> Thanks for the reply - here are some more details:
>
> 1. Not all names have suffixes
> 2. The pattern should be pretty consistent:
> <Last_Name>+' '+<Suffix>+','+' '+<First_Name>+' '+'<Middle_Name>
>
> Thanks for any assistance, I hope this is more clear,
> Chris
>
>
> "Jim Kennedy" <kennedy-family_at_home.com> wrote in message
 news:<YtHF7.24243$Tb.13152218_at_news1.sttln1.wa.home.com>...
> > Its not easy. There are exceptions.
> > Do all names have a suffix? Are all last names without spaces?
 (probably
> > not e.g. Mc Connell etc.) So on the last name it might be difficult.
 Then
> > on the first name are all first names without a space?
> >
> > You first need to define the rules on how you are going to seperate the
 name
> > into pieces then you can write a query to do so. Please post the rules
> > first.
> >
> >
> > Jim
> > "Chris" <chris_self_at_yahoo.com> wrote in message
> > news:52f2f187.0111051202.6b75aeee_at_posting.google.com...
> > > Hi all -
> > >
> > > I would like to select a name field from one table (TableA) in the
 format:
> > >
> > > Smith Jr., John Paul
> > >
> > > and extract each piece to insert into fields on TableB
> > >
> > > First_Name
> > > Middle_Name
> > > Last_Name
> > > Suffix
> > >
> > > Does anyone know how I can do this with SQL?
> > >
> > > Thanks in advance.
Received on Tue Nov 06 2001 - 14:31:27 CET

Original text of this message