Hello,
I am using the given insert statement while creating a function, but it gives the following error.
LINE/COL ERROR -------------------------------------------------------
65/2 PL/SQL: SQL Statement ignored
70/6 PLS-00201: identifier 'COALESCE' must be declared
INSERT INTO t_arch (id, parent_node_id, child_node_id, parent_ord_no, child_ord_no, type_id, specified_in_dom)
(SELECT sq_arch.NEXTVAL,
nodeId,
newChild,
1,
COALESCE(MAX(child_ord_no), 0) + 1,
newArchTypeId,
1
FROM t_arch
WHERE parent_node_id = nodeId AND
specified_in_dom = 1
);
Regards
I am using the given insert statement while creating a function, but it gives the following error.
LINE/COL ERROR -------------------------------------------------------
65/2 PL/SQL: SQL Statement ignored
70/6 PLS-00201: identifier 'COALESCE' must be declared
INSERT INTO t_arch (id, parent_node_id, child_node_id, parent_ord_no, child_ord_no, type_id, specified_in_dom)
(SELECT sq_arch.NEXTVAL,
nodeId,
newChild,
1,
COALESCE(MAX(child_ord_no), 0) + 1,
newArchTypeId,
1
FROM t_arch
WHERE parent_node_id = nodeId AND
specified_in_dom = 1
);
Regards