Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01406: fetched column value was truncated (Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit)
ORA-01406: fetched column value was truncated [message #360034] Wed, 19 November 2008 05:19 Go to next message
NewLife
Messages: 170
Registered: April 2008
Senior Member
Hi, my client got this error while querying from an Oracle portal developed by us (well not me !! the older and smarter guys Smile )

ORA-01406: fetched column value was truncated


I did a google but since i am new to Oracle portal, i could not find the actual cause.

Please can anyone tell me if this error can be replicated only through PL/SQL without any portal, if yes, how ?


Also i found out that this is a bug in Oracle as per metalink, can this be the problem? Bug No. 4546618 ?

Please enlighten me on this
Re: ORA-01406: fetched column value was truncated [message #360044 is a reply to message #360034] Wed, 19 November 2008 06:00 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Basically the target variable is shorter than the value.

The bug does not apply to your version nor to Oracle Portal.

Regards
Michel
Re: ORA-01406: fetched column value was truncated [message #360047 is a reply to message #360044] Wed, 19 November 2008 06:07 Go to previous messageGo to next message
NewLife
Messages: 170
Registered: April 2008
Senior Member
ok, so is it possible for to replicate this error through PL/SQL?

I tried the below code but i got a different error:


declare
i number(3,2);
begin
    i := 123.456;
exception when others then    
    dbms_output.put_line('Error '||SQLERRM);
end;    

Error ORA-06502: PL/SQL: numeric or value error: number precision too large



[Updated on: Wed, 19 November 2008 06:08]

Report message to a moderator

Re: ORA-01406: fetched column value was truncated [message #360071 is a reply to message #360047] Wed, 19 November 2008 07:54 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> declare
  2  i number(3,2);
  3  begin
  4      i := 123.456;
  5  end;
  6  /
declare
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: number precision too large
ORA-06512: at line 4


Get rid of those useless WHEN OTHERS everywhere there are.

I don't think it is possible to reproduce this error in PL/SQL.

Regards
Michel


[Updated on: Wed, 19 November 2008 07:55]

Report message to a moderator

Previous Topic: dbms_output.put_line(boolean)
Next Topic: SQL Query verification
Goto Forum:
  


Current Time: Sat Dec 03 22:07:25 CST 2016

Total time taken to generate the page: 0.11364 seconds