Skip to Main Content

Oracle Database Discussions

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 11g cast

user9171931Dec 15 2010 — edited Dec 15 2010
Hi All,

I've faced one issue with Oracle 11g.
In Oracle 10g when you do:

create table Test as
select Cast(SomeField as nvarchar2(1)) as SomeField from Other_table;

if SomeField type is number(5) and it has value 11 - following error message will be generated:
ORA-12899: value too large for column ???
(actual: 3, maximum: 1)

and that is fair. In Oracle 11g the same operation inserts truncated values i.e. 1 in this example.

Is there a way to make it wok in 11g in the same way as 10g except compatibility parameter changes?

Thank you in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2011
Added on Dec 15 2010
6 comments
2,355 views