The word VARIANCE is reserved in PL/SQL V2.3 or later and, if used, generates a compiler error.
See the example for information on how to use VARIANCE without generating an error.
The example first presents PL/SQL V1 code that will generate a compiler error, then shows how you might edit the code to avoid the error.
Example 1:
Change this code:
FUNCTION variance (y IN NUMBER)
RETURN NUMBER IS
BEGIN
. . .
RETURN . . .;
END;
. . .to this:
FUNCTION varianceUniqueName (y IN NUMBER)
/* A unique name was appended to Variance. */
RETURN NUMBER IS
BEGIN
. . .
RETURN . . .;
END;
Example 2:
When calling a subprogram, change the code:
PROCEDURE foo IS
x NUMBER;
y NUMBER;
BEGIN
. . .
x := variance(someNumber);
END;
. . .to this:
PROCEDURE foo IS
x NUMBER;
y NUMBER;
BEGIN
. . .
x := varianceUniqueName(someNumber);
END;