Parse it via CF so you can use RegEx (shoulda known that'd be my answer,
huh?)
<cfloop query="get_all_names">
<cfif refindnocase("^[a-z]+ [a-z]+ [a-z]\.$", name)>
treat it as a space-delimited list and insert as fname lname mi
<cfelse>
it's not last first mi format, so insert all into fname
</cfif>
</cfloop>
What's my prize? :-)
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
: From: Eric Creese [mailto:[EMAIL PROTECTED]
: Sent: Thursday, July 17, 2003 4:13 PM
: To: CF-Talk
: Subject: OT: Think you are a SQL GURU? Try figuring this one out.
:
:
: Here is the challenge.
:
: Have a table with a column called NAME and the column contains
: both names of businesses and individuals. Business names are
: stored as is , example ABC Company. Individuals are stored as
: last name first name middle initial, example Public John Q. I
: need to get this information into another table where the biz
: name can be stored in the first name field no problem but I need
: to parse and individuals name so I can put the individual's first
: name in the first name column and their last name in the last
: name column.
:
: Figure it out and I will send you a prize.
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4