background image
<< Auto Compiling Procedures | Entering the Function Code >>
<< Auto Compiling Procedures | Entering the Function Code >>

Creating a Function with GUI Menu

Creating and Using Standalone Procedures and Functions
Developing and Using Stored Procedures 4-5
Note that the tile of the
add_evaluation
pane is in regular font, not italic; this
indicates that the procedure is saved to the database
To create a function:
You will create a new function
calculate_score
, which calculates the weighted
score based on the performance in a particular category.
1.
In the Connections navigation hierarchy, right-click Functions.
2.
Select New Function.
3.
In the New Function window, set the following parameters:
Ensure that Schema is set to
HR
.
Set Name to
CALCULATE_SCORE
.
In the Parameters pane, set the <return> Type to
NUMBER
.
Similarly, add the following parameters, in this order:
cat: set Type to
VARCHAR2
, set Mode to
IN
, and leave Default Value empty.
score: set Type to
NUMBER
, set Mode to
IN
, and leave Default Value empty
weight: set Type to
NUMBER
, set Mode to
IN
, and leave Default Value empty
Click OK.