MurraySobol
Technical User
I have created an Oracle Function using a reference cursor.
Here is the Oracle version:
CREATE OR REPLACE FUNCTION f_get_name_address_list
(p_name_and_address_id IN varchar2)
RETURN SYS_REFCURSOR
IS
v_ret SYS_REFCURSOR;
BEGIN
OPEN v_ret FOR
SELECT c.name_and_address_id,
c.full_name,
c.parent_record_id,
LEVEL pass
FROM s1_name_and_address c
START WITH c.name_and_address_id = p_name_and_address_id
CONNECT BY NOCYCLE PRIOR c.name_and_address_id = c.parent_record_id;
RETURN v_ret;
END;
/
Can anyone assist me with the translation to SQL Anywhere??
Specificall, I dont know how to handle "Start with" and "connect by".
Thanks for any assistance.
Here is the Oracle version:
CREATE OR REPLACE FUNCTION f_get_name_address_list
(p_name_and_address_id IN varchar2)
RETURN SYS_REFCURSOR
IS
v_ret SYS_REFCURSOR;
BEGIN
OPEN v_ret FOR
SELECT c.name_and_address_id,
c.full_name,
c.parent_record_id,
LEVEL pass
FROM s1_name_and_address c
START WITH c.name_and_address_id = p_name_and_address_id
CONNECT BY NOCYCLE PRIOR c.name_and_address_id = c.parent_record_id;
RETURN v_ret;
END;
/
Can anyone assist me with the translation to SQL Anywhere??
Specificall, I dont know how to handle "Start with" and "connect by".
Thanks for any assistance.