【发布时间】:2012-01-31 04:53:30
【问题描述】:
declare
l_tot number := 0;
begin
for i in 1..apex_application.g_f08.count loop
l_tot := l_tot + nvl(to_number(apex_application.g_f08(i)),0);
end loop;
if l_tot = nvl(to_number(:P21_TOTAL_PRICE),0) then
return true;
else
return false;
end if;
end;
上面的代码出现以下错误
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
:P21_TOTAL_PRICE 发生错误。怎么了?我该如何纠正这个问题?
【问题讨论】:
-
价格字段中是否有逗号或空格?
-
@Sathya 是的。
:P21_TOTAL_PRICE中的值,例如5,500.00