1

我在 Oracle 数据库中有一个列,其中存储了连接值。例如,

/uk/letters/default?/uk/letters/funny_letters? 
/uk/letters/letters?/library/conditionalstyle?o=3&f=11/uk/letters/funny_letters?    
/uk/workinglife/viewarticle_93?/library/conditionalstyle?/uk/financialcentre/car_tax_calculator?
/uk/job-hunting/default?/partners/msn/i-resignfinctr?/uk/letters/letters?/ 

在网址之间,有一些空格。我怎样才能删除它们?

4

2 回答 2

3
UPDATE YourTable
SET YourColumn = REPLACE(YourColumn, ' ', '')
于 2012-12-19T21:08:55.557 回答
0

这为时已晚,但会帮助一些人。

select regexp_replace(column_name, '[[:space:]]+', chr(32))  from table_name;

验证后,可以如下更新表格;

UPDATE table_name
SET column_name = REGEXP_REPLACE (column_name ,'[[:space:]]+',' ');
于 2018-09-27T23:21:26.580 回答