ORA-01403未找到数据的错误。其中jkcode,serialid是varchar2(64)。语句是这样的:

select

     jk_code,serial_id into jkcode,serialid

from

    contract_account,customer,mp,meter

where

    contract_account.customer_id=customer.customer_id and contract_account.contrac_id=mp.contrac_id

    and mp.mp_jd=meter.mp_id and meter.meter_id=meter_cursor.newmeterid;

 原来根据某些 meter_cursor.newmeterid查不到jk-code与serial-id即查到0条,我猜测在into的时候有问题。具体为什么不行我 也不是很晓得。但是能知道要是查不到信息into就提示上面的错误。解决办法很容易就是将这个语句复制一下,先计算count(*)如果为0就不执行,如 果》0就执行上面的语句。

相关文章:

  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2022-12-23
  • 2021-04-26
  • 2022-01-24
  • 2022-12-23
相关资源
相似解决方案