REGEXP_REPLACE help
From: Dereck L. Dietz <dietzdl_at_ameritech.net>
Date: Thu, 26 Mar 2009 16:45:32 -0400
Message-ID: <GNRyl.15036$W06.8754_at_flpi148.ffdc.sbc.com>
Oracle 10.2.0.3
Windows 2003 Server
Date: Thu, 26 Mar 2009 16:45:32 -0400
Message-ID: <GNRyl.15036$W06.8754_at_flpi148.ffdc.sbc.com>
Oracle 10.2.0.3
Windows 2003 Server
I have a query which was designed using a regular expression to get the LAST and FIRST name from a column which had one string in the format of LAST, FIRST MI/NAME in one column. It originally worked written as:
last_name = regexp_replace(name, '(.+), (.+) (.+)','\1') first_name =regexp_replace(name, '(.+), (.+) (.+)','\2')
But now the data we receive has been changed and there are now rows in the data with only a LAST and FIRST names.
I'm not very familiar with regular expressions so can anybody either show me how or point me to an example of where I could possibly handle both possibilities?
Thanks very much. Received on Thu Mar 26 2009 - 15:45:32 CDT