SQL中,使用NVL函数,报错:ora-01722:无效数字
updateabmi_item_storage_alltsett.amount=nvl((selectto_number(nvL(a.function_text,0))f...
update abmi_item_storage_all t set t.amount = nvl((select to_number(nvL(a.function_text,0)) from abmi_item_all a where a.function_text is not null and a.item_id = t.item_id and a.item_code = t.item_code and a.item_type = 7 and a.org_id = t.org_id),0) where (select item_type from abmi_item_all where item_id = t.item_id) = 7 and t.item_code not like 'M-%' and t.org_id = 602 and t.period_code = 'GHCD-JAN-11';在执行这条SQL语句时,弹出ORA-01722:数字无效错误,因条件org_id和period_code的影响,有时报错,有时通过,完美一点的SQL,使用NVL 语句。谢谢!!!
展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |