Procedure or Function [message #638417] |
Thu, 11 June 2015 06:34 |
roni_a180
Messages: 45 Registered: October 2007
|
Member |
|
|
my db is oracle 10g and nls_lang is 'UTF8'. but problem is when i create a function or procedure with
input parameter no sql error show. but when i compile every time show in is not valid integer.
----****
CREATE OR REPLACE FUNCTION HOUSE_SAL (GROSSSAL NUMBER, workertype varchar2)RETURN NUMBER IS
v_medical number;
v_convance number;
v_fdallow number;
v_basic number:= 0;
v_house_sal number;
BEGIN
v_basic := BASIC_CAL(GROSSSAL,workertype);
v_medical := MEDICAL_SAL(GROSSSAL,workertype);
v_convance := CONVANCE_CAL(GROSSSAL,workertype);
v_fdallow := FOODALLOW_CAL(GROSSSAL,workertype);
v_house_sal:= GROSSSAL - (v_basic + v_medical + v_convance + v_fdallow);
return v_house_sal;
exception
when others then null;
END;
/
-
Attachment: Untitled.jpg
(Size: 46.67KB, Downloaded 593 times)
[Updated on: Thu, 11 June 2015 06:36] Report message to a moderator
|
|
|
|
|
Re: Procedure or Function [message #638427 is a reply to message #638424] |
Thu, 11 June 2015 08:08 |
cookiemonster
Messages: 13915 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
It's not all obvious from the screen shot what's causing the error. The error message isn't an oracle error message so it would appear that it's TOAD itself that's complaining. Have you tried compiling it via sqlplus? (after removing the exception handler as the others have said).
|
|
|