Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

variable initiation issue in 12c

User_3KN2HAug 24 2016 — edited Aug 24 2016

We ran into an odd issue after upgrading to 12c from 11g for which I was hoping to get some feedback. 

A process we run has a variable for international phone numbers that was defined as l_phone varchar2(16).  After the upgrade, the process started throwing an ORA-06502: PL/SQL: numeric or value error: character string buffer too small on one record, killing the feed about midway through.  The offending record appeared to be exactly 16 characters, including parens, spaces, and numbers and was at least a year old, so we knew it wasn't a new record causing a post-upgrade problem.

I ended up redefining the variable as type%table.phone, since the source table column is also defined as VARCHAR2(16 CHAR) and this solved the problem.  So my question is, has something changed in 12c with regard to initializing VARCHAR2 variables, aside from the size increase from 4000 to 32767??

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 21 2016
Added on Aug 24 2016
6 comments
282 views