这个错误如何处理呀: ORA-06502: PL/SQL: numeric or value error, 着急
我写了一个游标.主要的功能是把一个表的数据合并到另一个表中 ,其中content ,col004 字段都是lang 型的. 但是运行后提示:
这个错误如何处理呀: ORA-06502: PL/SQL: numeric or value error
下面是我的源代码: 大家看有什么方法没有,急啊,谢谢了
Declare
CURSOR bcur
IS SELECT col001, to_char(to_date(col002,'yyyy-mm-dd hh:mi:ssam'),'yyyymmdd'), to_char(to_date(col002,'yyyy-mm-dd hh12:mi:ssam'),'hh24:mi:ss'), channelid,columnid, col003, col004 from AUDIT_TUTORSHIP;
brec bcur%ROWTYPE;
BEGIN
insert into cms_content_ceshi(title,pubdate, pubtime,columnid,channelid,description) (select col001, to_char(to_date(col002,'yyyy-mm-dd hh:mi:ssam'),'yyyymmdd'), to_char(to_date(col002,'yyyy-mm-dd hh12:mi:ssam'),'hh24:mi:ss'), columnid,channelid,col003 from AUDIT_TUTORSHIP);
OPEN bcur;
LOOP
FETCH bcur INTO brec;
EXIT WHEN bcur%NOTFOUND;
update cms_content_ceshi set content = brec.col004 where title=brec.col001;
END LOOP;
CLOSE bcur;
END;
这个错误如何处理呀: ORA-06502: PL/SQL: numeric or value error
下面是我的源代码: 大家看有什么方法没有,急啊,谢谢了
Declare
CURSOR bcur
IS SELECT col001, to_char(to_date(col002,'yyyy-mm-dd hh:mi:ssam'),'yyyymmdd'), to_char(to_date(col002,'yyyy-mm-dd hh12:mi:ssam'),'hh24:mi:ss'), channelid,columnid, col003, col004 from AUDIT_TUTORSHIP;
brec bcur%ROWTYPE;
BEGIN
insert into cms_content_ceshi(title,pubdate, pubtime,columnid,channelid,description) (select col001, to_char(to_date(col002,'yyyy-mm-dd hh:mi:ssam'),'yyyymmdd'), to_char(to_date(col002,'yyyy-mm-dd hh12:mi:ssam'),'hh24:mi:ss'), columnid,channelid,col003 from AUDIT_TUTORSHIP);
OPEN bcur;
LOOP
FETCH bcur INTO brec;
EXIT WHEN bcur%NOTFOUND;
update cms_content_ceshi set content = brec.col004 where title=brec.col001;
END LOOP;
CLOSE bcur;
END;
...全文
相关推荐
【故障解决】ORA-06502
【故障解决】ORA-06502 PLSQL numeric or value error character string buffer too small.pdf
ORACLE ORA错误大全
ORA这样的错误信息一般会显示在哪里了呢?是只出现在sqlplus里吗?我在操作的时候会出现这样的错误?这样的ORA错误会不会出现在日志里面呢?比如ORA-01650这样的错误。
Oracle Exception汇总(自定义Oracle异常)
Oracle Exception汇总(自定义Oracle异常) 使用方法举例: Exception When no_data_found then Dbms_output.put_line(‘no_data_found’); ACCESS_INTO_NULL 为对象赋值前必需初始化对象。对应ORA-06530错误。 CASE_NOT_FOUND 使用CASE语句时在WHEN子句中没有包含必需的条件分支,并且没有包含ELSE语句。 对应ORA-06592错误。 COLLECTION_IS_NULL 给集合元素赋值前,必需初始化集合元素。对应ORA-06531错误。 CURSOR_ALRADY_OPEN 重新打开已经打开的游标。对应ORA-06511错误。 DUP_VAL_ON_INDEX 在惟一索引所对应的列上键入重复值。对应ORA-00001错误。
Oracle 存储过程异常处理.docx
Oracle 存储过程异常处理.docx
PL/SQL基础一之pl/sql块
NULL 博文链接:https://724073277.iteye.com/blog/1736292


