Hello,
For the following function created I am getting the listed error.
Errors for FUNCTION GETPARENTNODES:
LINE/COL ERROR -------------------------------------------------------
22/2 PL/SQL: Statement ignored
22/10 PLS-00382: expression is of wrong type
CREATE OR REPLACE FUNCTION getParentNodes (nodeId NUMBER) RETURN NUMBER IS
CURSOR cr_ParentNodes IS
SELECT parent_node_id
FROM t_arch
WHERE specified_in_dom = 1 AND
child_node_id = nodeId;
parentNodeId cr_ParentNodes%ROWTYPE;
BEGIN
OPEN cr_ParentNodes;
LOOP
FETCH cr_ParentNodes INTO parentNodeId;
EXIT WHEN cr_ParentNodes%NOTFOUND;
END LOOP;
CLOSE cr_ParentNodes;
RETURN parentNodeId;
END getParentNodes;
Can anyone please sort this thing out.
Regards
For the following function created I am getting the listed error.
Errors for FUNCTION GETPARENTNODES:
LINE/COL ERROR -------------------------------------------------------
22/2 PL/SQL: Statement ignored
22/10 PLS-00382: expression is of wrong type
CREATE OR REPLACE FUNCTION getParentNodes (nodeId NUMBER) RETURN NUMBER IS
CURSOR cr_ParentNodes IS
SELECT parent_node_id
FROM t_arch
WHERE specified_in_dom = 1 AND
child_node_id = nodeId;
parentNodeId cr_ParentNodes%ROWTYPE;
BEGIN
OPEN cr_ParentNodes;
LOOP
FETCH cr_ParentNodes INTO parentNodeId;
EXIT WHEN cr_ParentNodes%NOTFOUND;
END LOOP;
CLOSE cr_ParentNodes;
RETURN parentNodeId;
END getParentNodes;
Can anyone please sort this thing out.
Regards