四川移动oss
ztbsuper
这个作者很懒,什么都没留下…
展开
-
常用函数
[size=large]进制转化[/size]10->16[code="sql"]select to_char(10,'XX') from dual[/code]16->10[code="sql"]select to_number(10,'XX')from dual[/code][size=large]去掉左右空格的函数[/size][code="sql"]up...2010-03-30 13:42:43 · 117 阅读 · 0 评论 -
找重复按最大int_id删除重复
[code="sql"]update rms_cellset stateflag=to_char(sysdate,'yyyymmddhh24miss')where int_id in(select max(int_id)from rms_cell where MCC||'-'||MNC||'-'||LAC||'-'||CIin (select MCC||'-'||MNC...原创 2010-05-11 17:03:24 · 116 阅读 · 0 评论 -
更新2干传输设备
[code="sql"]update rms_transne_2gx set (ZH_LABEL,NE_CODE,RELATED_EQUIPROOM,RELATED_RACK,SERIAL,PRODUCT,STATUS,CITY_ID,ENTER_TIME,CUT_TIME)=( select rms_transne.ZH_LABEL,rms_transne.N...原创 2010-07-20 17:24:09 · 151 阅读 · 0 评论 -
2干的NEPORT_2V
[code="sql"]-----更改设备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_USERSET SOURCE_NE=REPLAC...原创 2010-05-06 16:29:22 · 105 阅读 · 0 评论 -
2干的neport
[code="sql"]-----------------改变全角字符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=RE...2010-04-28 11:17:31 · 106 阅读 · 0 评论 -
本地网neport的乱七八糟
[code="sql"]SELECT count(*) FROM RMS_NEPORT_2GX portWHERE exists ( SELECT 1 FROM RMS_TRANSCIR_USER usr,RMS_NEPORT_2GX port where usr.SOURCE_NE= port.SOURCE_NE_COL and usr.S...2010-04-26 17:59:57 · 130 阅读 · 0 评论 -
数据库的正则,用于PQ端口拆分
对带 扩-X 的进行拆分[code="sql"]update RMS_TRANSCIR_USERset SOURCE_TRANS_PORT=substr(SOURCE_TRANS_PORT,instr(SOURCE_TRANS_PORT,'-',1)+1,instr(SOURCE_TRANS_PORT,'PQ',1)-instr(SOURCE_TRANS_PORT,'-',1)-1)|...2010-04-26 17:55:09 · 151 阅读 · 0 评论 -
中心局,对换本\对端
[code="sql"]update RMS_TRANSCIR_LOCALset SOURCE_NE=REMOTE_TRANS_EQU,REMOTE_TRANS_EQU=SOURCE_NE,SOURCE_TRANS_PORT=REMOTE_TRANS_PORT,REMOTE_TRANS_PORT=SOURCE_TRANS_PORTwhere SOURCE_NE not in (sele...2010-04-21 17:23:01 · 101 阅读 · 0 评论 -
双表关联,非唯一字段的update
[code="sql"]update RMS_TRANSCIR_USER usr set usr.SOURCE_NE= ( select ne.OLD_NAME from RMS_TRANSNE ne where usr.remark=substr(ne.OLD_NAME,1,instr(ne.OLD_NAME,'-',1)-1)...2010-04-14 16:30:16 · 259 阅读 · 0 评论 -
交换path
[code="sql"]UPDATE RMS_PATHSET ANENAME=ZNENAME,APTP=ZPTP,ACTP=ZCTP,ZNENAME=ANENAME,ZPTP=APTP,ZCTP=ACTP,ANENAME_COL=ZNENAME_COL,ZNENAME_COL=ANENAME_COL,ACITY_ID=ZCITY_ID,ZCITY_ID=ACITY_IDWHERE AC...原创 2010-06-01 18:25:20 · 125 阅读 · 0 评论