Hi,
I have a column called THE_VALUE
in a table TABLE_A
, that holds data similar to the following, i.e a few sample rows might be:
tom:harry, sally, jeff
state(vic,nsw), england, qwerty(aaa,bbb, cccc):qaz
What I need to do to update this column using Oracle 10g sql and replace all commas, except the ones within the brackets with a colon, so basically, end result would be:
tom:harry:sally:jeff
state(vic,nsw):england:qwerty(aaa,bbb, cccc):qaz
I also want to ensure that there are no spaces after the colons, after the update.
I've tried using the replace
function but I am unsure as to how not to include the commas within the brackets, as I don't want these changed to colons.
Thanks.