Home » Developer & Programmer » Reports & Discoverer » REP-1401 fatal PL/SQL error (Report Builder 6.0.8.25.0(32 bit))
REP-1401 fatal PL/SQL error [message #283369] Mon, 26 November 2007 23:32 Go to next message
qaiserbashirpk
Messages: 28
Registered: July 2007
Location: Rawalpindi
Junior Member

hi i m using the formula column and facing the above mentioned problem can any one help....to solve it...

function Disease return Char is
vDisease varchar2(500);
begin
select descr into vDisease from opd$icd where Code in (select a.FINDIAGNOSIS || a.PROVDIAGNOSIS || a.DIFFDIAGNOSIS
from OPD$Diagnosis a, OPD$ICD b
where a.regnum=:regnum
and (a.PROVDIAGNOSIS = b.code
OR a.DIFFDIAGNOSIS = b.code
OR a.FINDIAGNOSIS = b.CODE )
and b.CHRONIC = 'Y'
and a.visitdate between :P_FROMDATE and :P_TODATE);

return(vDisease);
exception when others then
return (sqlerrm);
end;

and after this another error occured rep-0619 u cannot run with out layout
Re: REP-1401 fatal PL/SQL error [message #283381 is a reply to message #283369] Tue, 27 November 2007 00:14 Go to previous messageGo to next message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle

ORA-01401 inserted value too large for column

Cause: The value entered is larger than the maximum width defined for the column.

Action: Enter a value smaller than the column width or use the MODIFY option with ALTER TABLE to expand the column width.


Enlarge 'vDisease' variable size or use SUBSTR function to cut off 'a.FINDIAGNOSIS || a.PROVDIAGNOSIS || a.DIFFDIAGNOSIS' size to max 500 characters. Or, eventually, check size of a field you are returning 'vDisease' into.

Also, remove that silly WHEN OTHERS exception handler as it does nothing useful.
Re: REP-1401 fatal PL/SQL error [message #283409 is a reply to message #283381] Tue, 27 November 2007 01:17 Go to previous messageGo to next message
qaiserbashirpk
Messages: 28
Registered: July 2007
Location: Rawalpindi
Junior Member

Dear i have done this allready...but it hapened same as it is mentioned in question..so plz if u can give any other solution.....thnks for reply
Re: REP-1401 fatal PL/SQL error [message #283425 is a reply to message #283409] Tue, 27 November 2007 02:13 Go to previous message
Littlefoot
Messages: 20896
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
First of all, I apologize: this was a nonsense:
Quote:

... use SUBSTR function to cut off 'a.FINDIAGNOSIS || a.PROVDIAGNOSIS || a.DIFFDIAGNOSIS' size to max 500 characters
I didn't read your query carefully enough. If SUBSTR needs to be used, it is the 'descr' column it should be applied to.

In order to avoid such misunderstandings, please, read the OraFAQ Forum Guide to learn how to properly format your code (using the [code] tags).

Could you, please, post your current function code (do use [code] tags, please!) and, possibly, result of this SELECT statement when ran in SQL*Plus. Don't forget to remove the WHEN OTHERS exception handler.
Previous Topic: calling report runtime from pl/sql proceduere
Next Topic: Conversion of Currency in to words
Goto Forum:
  


Current Time: Tue Dec 06 02:20:43 CST 2016

Total time taken to generate the page: 0.14750 seconds