Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 如何卸下和更换";)&引用;空间_Sql_Oracle - Fatal编程技术网

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 ('

我无法在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 (' || 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), ' ')