- 浏览: 23330 次
- 性别:
- 来自: 成都
最近访客 更多访客>>
最新评论
-
ztbsuper:
icefishc 写道加了()就有函数原型了.啊!非常感谢!
perl的报错(too many argument) -
icefishc:
加了()就有函数原型了.
perl的报错(too many argument)
文章列表
事例1
my %hash=(
'1-a' => 'a',
'2-b' => 'b',
'3-c' => 'c',
'4-d' => 'd',
'5-e' => 'e');
foreach my $key(keys %hash)
{
print $key."\n";
foreach my $dkey(keys %hash)
{
delete $hash{$dkey};
}
}
事例2
my %hash=(
'1-a' => 'a',
'2-b ...
退出码的值 含义 例子 注释
1 通用错误 let "var1 = 1/0" 各种各样的错误都可能使用这个退出码, 比如"除0错误"
2 shell内建命令使用错误(Bash文档上有说明) 很少看到, 通常情况下退出码都为1
126 命令调用不能执行 程 ...
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.NE_CODE,rms_transne.RELATED_EQUIPROOM,rms_transne.RELATED_RACK,rms_transne.SERIAL,rms_transne.PRODUCT,rms_transne. ...
get_ddl('TABLE','表名','实例名') from dual
select dbms_metadata.get_ddl('TABLE','RMS_CITY','RMS') from dual
结果
CREATE TABLE "RMS"."RMS_CITY"
( "INT_ID" NUMBER(*,0) NOT NULL ENABLE,
"CITY_ID" NUMBER(*,0),
"LONG_SECTION" VARCHAR2(10), ...
UPDATE RMS_PATH
SET 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_ID
WHERE ACITY_ID<>800
AND ZCITY_ID=800
一个脚本突然没法用了,研究了半天,不觉得有变量污染
后来找到了解决方案
在定义函数的时候在后面加上了()括号,导致报错,如果去掉括号就会正常
求原理。。
delete from ROUND_NAME_TEMP A
where a.rowid <>(
select max(b.rowid)
from ROUND_NAME_TEMP B
where b.round_name=a.round_name
and b.ems_name=a.ems_name)
查看锁
select t2.username,t2.sid,t2.serial#,t2.logon_time
from v$locked_object t1,v$session t2
where t1.session_id=t2.sid order by t2.logon_time
解除锁
alter system kill session '813,7352'
SQL> set timing on; //设置显示“已用时间:XXXX”
SQL> set autotrace on-; //设置允许对执行的sql进行分析
SQL> set trimout on; //去除标准输出每行的拖尾空格,缺省为off
SQL> set trimspool on; //去除重定向(spool)输出每行的拖尾空格,缺省为off
SQL> set echo on //设置运行命令是是否显示语句
SQL> set echo off; //显示start启动的脚本中的每个sql命 ...
update rms_cell
set stateflag=to_char(sysdate,'yyyymmddhh24miss')
where int_id in(
select max(int_id)
from rms_cell where MCC||'-'||MNC||'-'||LAC||'-'||CI
in (
select MCC||'-'||MNC||'-'||LAC||'-'||CI
from RMS_CELL
where STATEFLAG=0
group by MCC||'-'||MNC||'-'||LAC||'-'||CI
having count(MC ...
-----更改设备
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_NE=REPLACE(SOURCE_NE,'-','-' );
UPDATE RMS_TRANSCIR_USER
SET REMOTE_TRANS_EQU=REPLACE(REMOTE_TRANS_EQU,'-','-' );
...
ls *P*.txt |awk -F'\_' '{print $1"_"$2}' | uniq | while read line
do
count=`ls $line\_*|wc -l`
echo $line":"$count
done
文件名按_分了3个段,前两个是固定,后一个段为时间
要查出前两个段相同的文件,打印出个数
-----------------改变全角字符
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,'-','-' ...
SELECT count(*) FROM RMS_NEPORT_2GX port
WHERE exists (
SELECT 1 FROM RMS_TRANSCIR_USER usr,RMS_NEPORT_2GX port
where usr.SOURCE_NE= port.SOURCE_NE_COL
and usr.SOURCE_TRANS_PORT = port.OLD_NAME
)
SELECT count(*) FROM RMS_NEPORT_2GX port
update RMS_NEPORT_2GX port ...
对带 扩-X 的进行拆分
update RMS_TRANSCIR_USER
set 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)||'-'||substr(SOURCE_TRANS_PORT,instr(SOURCE_TRANS_PORT,'PQ',1))
where regexp_like(SOURCE_TRANS_PORT,'\d+\-\d+PQ*' ...