欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Oracle去掉特殊字符的具体方法

程序员文章站 2023-11-25 16:37:10
复制代码 代码如下:/*lyxxb(陵园信息表)lymc(甲方),dz(通信地址),dh(联系电话)*/select lymc,dz,dh from lyxxb/*去掉回车...

复制代码 代码如下:

/*lyxxb(陵园信息表)
lymc(甲方),dz(通信地址),dh(联系电话)
*/
select lymc,dz,dh from lyxxb
/*去掉回车(\b)*/
update lyxxb set dz=replace(dz,chr(13),'')
/*去掉换行(\n)*/
update lyxxb set dz=replace(dz,chr(10),'')
/*去掉回车(\b)*/
update lyxxb set dh=replace(dh,chr(13),'')
/*去掉换行(\n)*/
update lyxxb set dh=replace(dh,chr(10),'')
/*ywdjb(业务登记表)
gxrxm(y乙方),azfsdm(类别),mwflmc(位置),lxdz(家庭地址),ksrq(开始日期),jsrq(结束日期),sfzh(身份证号),ssje(实收金额),rq(办理日期)
*/
/*生态*/
select gxrxm,azfsmc,mwflmc,to_char(ksrq,'yyyy') as years1,to_char(ksrq,'mm') as months1,to_char(ksrq,'dd') as days1,to_char(jsrq,'yyyy') as years2,to_char(jsrq,'mm') as months2,to_char(jsrq,'dd') as days2,ssje,money_to_chinese(ssje) as dx from ywdjb where djh='02x1995052119950140'

select gxrxm,lxdz,lxdh,sfzh,czyxm,to_char(rq,'yyyy') as years,to_char(rq,'mm') as months,to_char(rq,'dd') as days from ywdjb where djh='02x1995052119950140'


/*墓位*/
select gxrxm,mxmc,mwflmc,to_char(ksrq,'yyyy') as years1,to_char(ksrq,'mm') as months1,to_char(ksrq,'dd') as days1,to_char(jsrq,'yyyy') as years2,to_char(jsrq,'mm') as months2,to_char(jsrq,'dd') as days2,ssje,money_to_chinese(ssje) as dx from ywdjb where djh='20130201164043'

select s.scmxtjfl1,y.gxrxm,y.mxmc,y.mwflmc,to_char(y.ksrq,'yyyy') as years1,to_char(y.ksrq,'mm') as months1,to_char(y.ksrq,'dd') as days1,to_char(y.jsrq,'yyyy') as years2,to_char(y.jsrq,'mm') as months2,to_char(y.jsrq,'dd') as days2,y.ssje,money_to_chinese(y.ssje) as dx from ywdjb y inner join spmldm s on y.mxdm=s.spmldm where djh='20130201164043'

select scmxtjfl1 from spmldm where spmldm='305'

select * from ywdjb where mxdm='305'
/*续租*/
select mwflmc,mxmc,mj,dabh from qtywb where djh='032005032120050374' and ywdjh='yw200505090028'

select wrxm from wrxxb_str where djh='032005032120050374'

select wrxm from wrxxb_str where djh='02x1995040619950095'

select mwflmc,mxmc,mj,dabh from qtywb where djh='02x1995040619950095'
/*xx*/
select w.wrxm,q.sfzh,q.lxdz,q.czyxm,q.lxdh,to_char(q.rq,'yyyy-mm-dd') as sj,q.mwflmc,q.mxmc,q.mj,q.dabh,to_char(q.ksrq,'yyyy') as years1,to_char(q.ksrq,'mm') as months1,to_char(q.ksrq,'dd') as days1,to_char(q.jsrq,'yyyy') as years2,to_char(q.jsrq,'mm') as months2,to_char(q.jsrq,'dd') as days2 from qtywb q inner join wrxxb_str w on q.djh=w.djh where q.djh='032005032120050374' and q.ywdjh='yw200505090028'

select lymc from lyxxb


/*wrxxb(亡人信息表)
wrxm(亡人姓名),xb(性别),nl(年龄),mz(民族)
*/
select wrxm,x.xbmc,nl,mz from wrxxb w inner join xbxx x on w.xb=x.xbdm where djh='02x1995052119950140'

select to_char(rq,'yyyy') as years,to_char(rq,'mm') as months,to_char(rq,'dd') as days from ywdjb


select * from xbxx
select * from wrxxb

select ksrq,jsrq from ywdjb
select to_char(ksrq,'yyyy') as years1,to_char(ksrq,'mm') as months1,to_char(ksrq,'dd') as days1,to_char(jsrq,'yyyy') as years2,to_char(jsrq,'mm') as months2,to_char(jsrq,'dd') as days2 from ywdjb