| REGEXP_REPLACE Help NEEDED.... [message #635080] |
Thu, 19 March 2015 15:19  |
eastbay_oracle
Messages: 4 Registered: October 2010 Location: USA
|
Junior Member |
|
|
Hi..
I need some help pretty badly.. I have been working on this problem for days and cannot find a solution. I need to replace two numbers with two letters in the beginning of a value. The example I have is this is the value:
021111116 and I need to replace the 02 with SF and delete the last number 6.
I have been experimenting with regexp_replace and substr. I cannot get it to work...
I would greatly appreciate any help offered!
Thanks...
EBO
|
|
|
|
|
|
|
|
| Re: REGEXP_REPLACE Help NEEDED.... [message #635084 is a reply to message #635083] |
Thu, 19 March 2015 16:59  |
eastbay_oracle
Messages: 4 Registered: October 2010 Location: USA
|
Junior Member |
|
|
I got the statement to work by combining it with REPLACE..
UPDATE SCHEMAOWNER.TABLENAME
SET employeeID = REPLACE(employeeID,employeeID,'SF'||substr(employeeID, 3, length(employeeID) - 3);
Thanks for your help!
EBO
|
|
|
|