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

常用函数

程序员文章站 2022-06-20 08:57:56
...
[size=large]进制转化[/size]
10->16

select to_char(10,'XX') from dual


16->10
select to_number(10,'XX')from dual


[size=large]去掉左右空格的函数[/size]
update RMS_NEPORT_LOCAL set SLOT_NO_16=ltrim(SLOT_NO_16)

update RMS_NEPORT_LOCAL set SLOT_NO_16=rtrim(SLOT_NO_16)



[size=large]烽火本地网设备端口按板卡类型进行数据规整(按不同型号的卡的槽位来进行命名[/size])
update RMS_NEPORT_LOCAL set USER_LABEL='T2.'||PORTNO
where stateflag=0
and VENDOR like '烽火'
and SLOT_NO_16 like '4'
and CARD_TYPE in('E1','E1-16','E1-32B','E1-63','E1-63FW')
and SOURCE_NE in(
select INT_ID from RMS_TRANSNE_LOCAL
where STATEFLAG=0
and MODEL_COL like '155 C'
)


[size=large]信令链路[/size]
本端到对端
select SIG_NE 网元,REMOTE_NAME 对端,SLC,TK_PORT_PHY,LINK_TYPE 端口 from RMS_LINK
where STATEFLAG=0
and SIG_NE like 'MYHLR3'
order by SIG_NE,REMOTE_NAME,SLC,TK_PORT_PHY


对端到本段
select SIG_NE 网元,REMOTE_NAME 对端,SLC,TK_PORT_PHY 端口 from RMS_LINK
where STATEFLAG=0
and REMOTE_NAME like 'MYHLR3'
order by REMOTE_NAME,SIG_NE,SLC,TK_PORT_PHY


[size=large]传输电路[/size]
select SOURCE_BUSI_EQU 本端,SOURCE_BUSI_PORT 端口,REMOTE_BUSSI_EQU 对端 from RMS_TRANSCIR 
where STATEFLAG=0
and SOURCE_BUSI_EQU like 'MYHLR3'
order by REMOTE_BUSSI_EQU,SOURCE_BUSI_PORT
相关标签: SQL C C++ C#