这个错误如何处理呀: 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;