Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Oracle 10g remove character from string

Posted on 2012-08-21
3
Medium Priority
?
1,470 Views
Last Modified: 2012-08-21
I have a series of values in my tables that contain an unwanted ‘#’ character. I need to remove it.
All affected values start with ‘P-# and look like P-#nnnnnnnn  where nnn is a random number.
How can I remove the #  so the value results in ‘P-nnnnnnn’
0
Comment
Question by:JDCam
  • 2
3 Comments
 
LVL 74

Expert Comment

by:sdstuber
ID: 38316345
update your_table set your_column = replace(your_column,'#')
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 2000 total points
ID: 38316358
you could add a where clause too

update your_table set your_column = replace(your_column,'#')
where your_column like 'P-#%'
0
 
LVL 1

Author Closing Comment

by:JDCam
ID: 38316387
Worked great ... thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question