Help - Oracle Errors and Pragmas
Annoyed now! I need to calculate the difference between two numbers and output a value based on the result in a select statement. This is on Oracle 7.3.2.3.0 (yes, I know it's old...!!!) so I can't use CASE. I'm trying to do it as a function in a pre-existing package:
Spec:
Body
The error I get is: PLS-00452: Subprogram 'COMPARE_NUMBERS' violates its associated pragma.
Tried looking on Metalink with no joy

I've no doubt done something stupid, so can someone point it out please!
Ta!
Iain
[Edited by V5 - 10/28/2002 4:58:49 PM]
Spec:
Code:
FUNCTION compare_numbers ( p_qty1 IN NUMBER, p_qty2 IN NUMBER) RETURN NUMBER; PRAGMA RESTRICT_REFERENCES (compare_numbers, WNDS);
Code:
FUNCTION compare_numbers (p_qty1 NUMBER, p_qty2 NUMBER)
RETURN NUMBER
IS
BEGIN
IF p_qty1 > p_qty2
THEN
RETURN 0;
ELSE
RETURN 3;
END IF;
EXCEPTION
WHEN OTHERS
THEN
err.application_error('jmc_upld', 'compare_numbers');
RETURN NULL;
END compare_numbers;
Tried looking on Metalink with no joy

I've no doubt done something stupid, so can someone point it out please!

Ta!
Iain
[Edited by V5 - 10/28/2002 4:58:49 PM]
Cheers Towzer, but I've relalised (ok, well, a colleague has
) what the problem is. The exception writes to our debug table....and this is supposed to be a bit of code that doesn't update the database. D'oh!! 
) what the problem is. The exception writes to our debug table....and this is supposed to be a bit of code that doesn't update the database. D'oh!! 
Thread
Thread Starter
Forum
Replies
Last Post



