-----------------改变全角字符
SELECT 'RMS_TRANSCIR_USER->改变全角字符:' AS remark,TO_CHAR(CURRENT_DATE,'YYYY-MM-DD HH24:MI:SS') AS deal_time FROM dual;
UPDATE RMS_TRANSCIR_USER
SET SOURCE_NE=REPLACE(SOURCE_NE,'-','-' );
UPDATE RMS_TRANSCIR_USER
SET REMOTE_TRANS_EQU=REPLACE(REMOTE_TRANS_EQU,'-','-' );
-----------------对网元编号提取,存入本端和对端num
SELECT 'RMS_TRANSCIR_USER->对网元编号提取,存入本端和对端num:' AS remark,TO_CHAR(CURRENT_DATE,'YYYY-MM-DD HH24:MI:SS') AS deal_time FROM dual;
UPDATE RMS_TRANSCIR_USER
SET SOURCE_NUM=SUBSTR(SOURCE_NE,1,INSTR(SOURCE_NE,'-',1)-1);
UPDATE RMS_TRANSCIR_USER
SET REMOTE_NUM=SUBSTR(REMOTE_TRANS_EQU,1,INSTR(REMOTE_TRANS_EQU,'-',1)-1);
-----------------根据本端/对端的编号从 RMS_TRANSNE_2GX 更新网元名
SELECT 'RMS_TRANSCIR_USER->更新网元名:' AS remark,TO_CHAR(CURRENT_DATE,'YYYY-MM-DD HH24:MI:SS') AS deal_time FROM dual;
UPDATE RMS_TRANSCIR_USER usr
SET SOURCE_NE= (
select ne.old_name
from RMS_TRANSNE_2GX ne
where substr(ne.old_name,1,instr(replace(ne.old_name,'-','-'),'-',1)-1)=usr.SOURCE_NUM
--and ne.related_ems=usr.
--and rownum=1
)
where exists
(
select 1
from RMS_TRANSNE_2GX ne
where substr(ne.old_name,1,instr(replace(ne.old_name,'-','-'),'-',1)-1)=usr.SOURCE_NUM
);
UPDATE RMS_TRANSCIR_USER usr
SET REMOTE_TRANS_EQU= (
select ne.old_name
from RMS_TRANSNE_2GX ne
where substr(ne.old_name,1,instr(replace(ne.old_name,'-','-'),'-',1)-1)=usr.REMOTE_NUM
--and rownum=1
)
where exists
(
select 1
from RMS_TRANSNE_2GX ne
where substr(ne.old_name,1,instr(replace(ne.old_name,'-','-'),'-',1)-1)=usr.REMOTE_NUM
);
----------------本/对端带扩的PQ拆分
SELECT 'RMS_TRANSCIR_USER->带扩的PQ拆分:' AS remark,TO_CHAR(CURRENT_DATE,'YYYY-MM-DD HH24:MI:SS') AS deal_time FROM dual;
update RMS_TRANSCIR_USER
set SOURCE_TRANS_PORT=substr(SOURCE_TRANS_PORT,instr(SOURCE_TRANS_PORT,'-',1)+1,instr(SOURCE_TRANS_PORT,'PQ1',1)-instr(SOURCE_TRANS_PORT,'-',1)-1)||'-'||substr(SOURCE_TRANS_PORT,instr(SOURCE_TRANS_PORT,'PQ1',1))
where regexp_like(SOURCE_TRANS_PORT,'\d+\-\d+PQ1*');
update RMS_TRANSCIR_USER
set REMOTE_TRANS_PORT=substr(REMOTE_TRANS_PORT,instr(REMOTE_TRANS_PORT,'-',1)+1,instr(REMOTE_TRANS_PORT,'PQ1',1)-instr(REMOTE_TRANS_PORT,'-',1)-1)||'-'||substr(REMOTE_TRANS_PORT,instr(REMOTE_TRANS_PORT,'PQ1',1))
where regexp_like(REMOTE_TRANS_PORT,'\d+\-\d+PQ1*');
----------------本/对端不带扩的PQ拆分
SELECT 'RMS_TRANSCIR_USER->不带扩的PQ拆分:' AS remark,TO_CHAR(CURRENT_DATE,'YYYY-MM-DD HH24:MI:SS') AS deal_time FROM dual;
update RMS_TRANSCIR_USER
set SOURCE_TRANS_PORT=substr(SOURCE_TRANS_PORT,1,instr(SOURCE_TRANS_PORT,'PQ1',1)-1)||'-'||substr(SOURCE_TRANS_PORT,instr(SOURCE_TRANS_PORT,'PQ1',1))
where regexp_like(SOURCE_TRANS_PORT,'\d+PQ1*');
update RMS_TRANSCIR_USER
set REMOTE_TRANS_PORT=substr(REMOTE_TRANS_PORT,1,instr(REMOTE_TRANS_PORT,'PQ1',1)-1)||'-'||substr(REMOTE_TRANS_PORT,instr(REMOTE_TRANS_PORT,'PQ1',1))
where regexp_like(REMOTE_TRANS_PORT,'\d+PQ1*');
----------------更新端口状态
SELECT 'RMS_NEPORT_2GX->更新端口状态:' AS remark,TO_CHAR(CURRENT_DATE,'YYYY-MM-DD HH24:MI:SS') AS deal_time FROM dual;
update RMS_NEPORT_2GX port
set port.PORT_STATUS_USER=null;
update RMS_NEPORT_2GX port
set port.PORT_STATUS_USER='在用'
where exists(
select 1
from RMS_TRANSCIR_USER
where REMOTE_TRANS_PORT=port.OLD_NAME
and REMOTE_TRANS_EQU=port.SOURCE_NE_COL
);
update RMS_NEPORT_2GX port
set port.PORT_STATUS_USER='在用'
WHERE exists (
SELECT 1
FROM RMS_TRANSCIR_USER usr
where usr.SOURCE_TRANS_PORT = port.OLD_NAME
and usr.SOURCE_NE= port.SOURCE_NE_COL
);
分享到:
相关推荐
NEPORT口(串口转以太网)的PCB封装库,希望对大家有帮助
NePort系列具备最高的设备服务器集成水平,其紧凑的RJ45封装内集成了32位RISC处理器、10/100兆以太网收发器、高速串行端口、状态/诊断LED灯以及2个可编程的I/O引脚。NePort节省的空间通常被连接器占用,却提供完整的...
标题中的“世界上最小的高稳定可靠低功耗的串口联网模块Neport.rar”指的是一种先进的物联网技术产品,名为Neport。这个模块是专为串行通信设计的,具有小巧的体积、卓越的稳定性、高可靠性以及低功耗的特点。在...
接下来,从描述中的“NePort串口转以太网模块用户手册”可以看出,NePort系列模块由Conextop公司生产,具备多个高速串口和10M/100M以太网接口,这表明模块在数据传输速度和接口兼容性方面具有优势。用户手册的提供,...
其中,STM32F103VCT6-2型微控制器被选为主控芯片,其内部集成的多种外设接口,使得该芯片能够方便地连接到多种类型的传感器、通信模块和报警设备。由于其高性能的处理能力和丰富的外设,STM32微控制器适合在复杂的...