Home » SQL & PL/SQL » SQL & PL/SQL » ORA-12899: value too large for column (Oracle 11g)
ORA-12899: value too large for column [message #611583] Fri, 04 April 2014 00:32 Go to next message
na.dharma@gmail.com
Messages: 82
Registered: May 2008
Location: bangalore
Member

Hi

I am getting the below error. when execute below alter statement.

Note : the function won't return length of the values 4

alter table d_credit_rating add(DOWNGRADED_4_CREDIT_RATING_ID VARCHAR2(10) GENERATED ALWAYS AS (DOWN_RATING(4,S_CREDIT_RATING_ID)))


ORA-12899: value too large for column "DOWNGRADED_4_CREDIT_RATING_ID" (actual: 10, maximum: 4000)
Re: ORA-12899: value too large for column [message #611586 is a reply to message #611583] Fri, 04 April 2014 01:04 Go to previous messageGo to next message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Try
alter table d_credit_rating add(DOWNGRADED_4_CREDIT_RATING_ID VARCHAR2(10) GENERATED ALWAYS AS
(cast (DOWN_RATING(4,S_CREDIT_RATING_ID) as varchar2(10)))

[Updated on: Fri, 04 April 2014 01:04]

Report message to a moderator

Re: ORA-12899: value too large for column [message #611589 is a reply to message #611586] Fri, 04 April 2014 01:49 Go to previous messageGo to next message
na.dharma@gmail.com
Messages: 82
Registered: May 2008
Location: bangalore
Member

Hi Michel..it's working thank you
Re: ORA-12899: value too large for column [message #611591 is a reply to message #611589] Fri, 04 April 2014 02:00 Go to previous message
Michel Cadot
Messages: 68645
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Thanks for the feedback.

Previous Topic: Date Format
Next Topic: finding missing parent from oracle hierarchical query
Goto Forum:
  


Current Time: Wed Apr 24 14:45:06 CDT 2024