Hi,

Can some one tell me how to handle multiple returns from a function which was called within a trigger.

Here is the declaration of the function which return three values:

CREATE FUNCTION get_bu_details( BU_id INTEGER )
RETURNING NVARCHAR(255), INTEGER, INTEGER;

DEFINE path NVARCHAR(255);
DEFINE level INTEGER;
DEFINE cc INTEGER;

SELECT SYS_CONNECT_BY_PATH (name,' | '), level, connect_by_isleaf INTO path, level, cc
FROM business_unit bu
WHERE bu.id = pBU_Id
START WITH bu.id = 1
CONNECT BY PRIOR bu.id = parent_id;

RETURN path, level, cc;

END FUNCTION;

I would like to call the above function from a trigger such as:

CREATE TRIGGER xxx update on business_unit referencing new as original for each row
(
(a, b, c) = get_bu_details(original.id); -- what is the correct syntax here?
update "sdev".bu_details set (bu_path, bu_level, bu_capex_center) =
(a,b,c) Where .bu_details.bu_id=original.id;

);

regards,
KW