Bummer.
Well, then you're going to have to parse based on spaces. I
suggest an approach like this:
1) Take everything left of the first space, and make that the first
name.
2) Take everything right of the last space, and make it the last name.
3) Take the rest and make that the middle name.
4) Do a select where middlename like '% %' and correct those by hand.
If you have SQL Books Online, I suggest reading up on the RIGHT,
LEFT, and CHARINDEX functions; those should be all you need.
Cheers,
Peter
-----Original Message-----
From: Anna Leon [mailto:[EMAIL PROTECTED]
Yes I know that, but I converted a database from
Access to SQL so the Name column consisted of First
Name, Middle Initial, and Last Name already.
Hence, I would like to break that column apart and do
whatever.
--- Peter Brunone <[EMAIL PROTECTED]> wrote:
>
> Simple answer: If you have three pieces of data,
> then you have
> three fields on the form.
>
> You could split based on spaces, but if you have a
> first name
> like "Mary Ann" or a last name like "Van Zandt",
> that just won't work.
>
> -----Original Message-----
> From: sas0riza [mailto:[EMAIL PROTECTED]
>
> This is a more SQL question, but how do you break
> apart a field? For
> instance, in a column, I have both first name,
> middle initial,
> and last name. (e.g. Mary J. Smith). How do I write
> the SQL so that
> it'll break apart the different parts of the name
> and then insert it
> into it's appropriate column?
>
> Mary -> FirstName
> J -> MiddleInitial
> Smith -> LastName
>
> Any help is appreciated!
>
> Thanks!
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Yahoo! Groups Links
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/