Sql 如何卸下和更换";)&引用;空间
我无法在sql中删除“)”、“(”和“/”之间的空格。我只想删除空格Sql 如何卸下和更换";)&引用;空间,sql,oracle,Sql,Oracle,我无法在sql中删除“)”、“(”和“/”之间的空格。我只想删除空格而不包括文本。怎么做 For example:- Sek. 175 (1) (a)/(b) atau Sek. 187B (1) (a)/(b) AND i want the text to be like this: Sek.175(1)(a)/(b) atau Sek.187B(1)(a)/(b) This is my query: SELECT distinct mhn.id_mohon, 'oleh sebab ('
而不包括文本。怎么做
For example:-
Sek. 175 (1) (a)/(b) atau Sek. 187B (1) (a)/(b)
AND i want the text to be like this:
Sek.175(1)(a)/(b) atau Sek.187B(1)(a)/(b)
This is my query:
SELECT distinct mhn.id_mohon,
'oleh sebab (' || ku.ruj_kanun || ')' ruj_kanun
FROM mohon mhn, kod_urusan ku, mohon_ruj_luar mrl, pguna pg,
kod_perintah kp
WHERE mhn.id_mohon = :p_id_mohon
AND mhn.kod_urusan = ku.kod(+)
AND mhn.id_mohon = mrl.id_mohon(+)
AND mrl.kod_perintah = kp.kod(+)
AND mhn.dimasuk = pg.id_pguna(+)
AND mhn.kod_urusan = 'PHKK'
有人知道这一点吗?肯定不是最有效的,但这应该有效
REPLACE(REPLACE(column, ' ', ''), 'atau', ' atau ')
等等
replace(
regexp_replace(
regexp_replace(
regexp_replace(
string,
'\s([a-zA-Z]+($|\W))', chr(0)||'\1'
),
'((^|\W)[a-zA-Z]+)\s', '\1'||chr(0)
),
'\s'),
chr(0), ' ')
请向我们展示您的select语句。变量检索?我还将TRIM
结果字符串;-)顺便说一句,它不会很好地处理单词atatau
(我甚至不知道它是否存在,或者它可能是一个脏话)。Egor Skriptunoff->非常感谢。:)
replace(
regexp_replace(
regexp_replace(
regexp_replace(
string,
'\s([a-zA-Z]+($|\W))', chr(0)||'\1'
),
'((^|\W)[a-zA-Z]+)\s', '\1'||chr(0)
),
'\s'),
chr(0), ' ')