需要修剪oracle中的空白空间 [英] Need to trim blank space in oracle
本文介绍了需要修剪oracle中的空白空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
无法在表格中的以下数据中剪裁空格.列数据类型为VARCHAR2(650 CHAR).我尝试了修剪功能以消除空白.但这对我不起作用.
Unable to trim blank space in below data in my table. column data type is VARCHAR2(650 CHAR). I tried trim function to eliminate blank space. but that is not working for me.
我表中的数据:
'xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14 '
'xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14 '
'xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14 '
我要整理以下数据
'xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14'
'xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14'
'xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14'
请您帮我一下.
推荐答案
使用Trim
函数
select Trim(trailing ' ' from 'xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14 ') from dual
或使用Rtrim
select RTrim('xxxxxxxxxx yyyyyyyyy - 12/7/14 - 12/13/14 ') from dual
这篇关于需要修剪oracle中的空白空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文