Updating a particular character in a field

Database

Updating a particular character in a field

Hi All,

Can some one help :

I have to replace all commas ',' in address field in my table and with space ' ' .
The address field has more than one commas.
i've tried using Index function where i can figure out just a single comma and try to concatenate the portion before the comma and space and then after the comma.

This will require looping too as the address field has more than one comma..

Is there any quick way to replace a character by another character ? . Please help.

Thanks,
3 REPLIES

Re: Updating a particular character in a field

Hi All... Its a urgent requirement.... Is there any function to do this ???????????????

Can some one help please ....
Enthusiast

Re: Updating a particular character in a field

Find the Replace UDF function within the Oracle UDFs set:

http://www.teradata.com/t/go.aspx/index.html?id=123970

Enthusiast

Re: Updating a particular character in a field

Sathya,

From your problem description, it seems that this is one time fix that you want to apply. If this is correct then you can fix this in following ways: -
1. The solution you mention works only for one comma. You can re-run the same SQL command again till all the commas are converted into spaces.
2. You can take an export of your data using FastExport. It will be very easy to replace comma with blank in Unix/Window env. You can then load this fixed data using FastLoad.

If this is not a one time fix, then using the UDF function seems to be the solution.

Hope this helps.