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!

Oracle VIEW created on SAP table

Chintan GandhiAug 1 2012 — edited Aug 1 2012
Hi All,

I've Oracle 10g. I've a view in it on an SAP table using DB link.

I started getting error ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind when this view is fetched using FOR loop. On investigation, I found that there is a column which when VIEW is described shows datatype as VARCHAR2(10) but it actually has some records with length more than 10.

When I modified PL/SQL block and modified this query by adding SUBSTR on the column to get just 10 chars, it worked.

I suspect that this SAP table might have been recently altered to increase columns length i.e. altered after VIEW was created on it. Here, my question is that will I need to recreate this view? As usually when a view is created on an Oracle table, it automatically inherits table column's data types. even when a table column is altered after view is created.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2012
Added on Aug 1 2012
5 comments
869 views