Satyanvesh D
Satyanvesh D

Reputation: 403

ORA-06553: PLS-306: wrong number or types of arguments in call to 'SUBSTR'

I'm running the below query in oracle and i m facing the error 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;

Not sure why substr is throwing error when the syntax seem to be correct. Can someone please help me with this.

Upvotes: -2

Views: 1507

Answers (1)

Joe Love
Joe Love

Reputation: 5952

Try the following:

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;

Upvotes: 0

Related Questions