ORA-06553:PLS-306:调用“ SUBSTR”时参数的数量或类型错误

时间:2018-12-28 08:22:18

标签: sql oracle substr ora-06553

我正在oracle中运行以下查询,并且遇到错误 ORA-06553

select cast(cbdev.cbchr(utl_raw.substr(4500, 5, 26)) AS DECIMAL (14, 2)) as grant_held 
  from bs_transaction 
 where account_coid = 'TS 0014 T8324J3L2V' 
   and txn_id = 21;

不确定语法正确时为什么substr会引发错误。 有人可以帮我吗

1 个答案:

答案 0 :(得分:0)

尝试以下操作:

select cast(cbdev.cbchr(utl_raw.substr('4500', 5, 26)) AS DECIMAL (14, 2)) as grant_held 
  from bs_transaction 
 where account_coid = 'TS 0014 T8324J3L2V' 
   and txn_id = 21;