Can PowerBuilder call below PostgreSQL procedure to return result set (refcursor type) in datawindow ?
CREATE OR REPLACE PROCEDURE public.get_employee_cursor(emp_id integer, INOUT swv_refcur refcursor DEFAULT NULL::refcursor)
LANGUAGE plpgsql
AS $procedure$
begin
open swv_refcur for
select a.first_name, a.last_name
from public.employees a
where a.employee_id = emp_id;
end;
$procedure$
;
Try below PB script but REF CURSOR returns syntax error