-- select * from adempiere.fnt_getref_list(117);
create or replace function fnt_getref_list(p_reference_id numeric(10,0))
returns table
(
value varchar,
name varchar
)
as $$
begin
return query
(
select
rl.value as value_x,
rl.name as name_x
from ad_reference r
join ad_ref_list rl
on r.ad_reference_id = rl.ad_reference_id
where r.validationtype = 'L'
and r.ad_reference_id = p_reference_id
);
end;
$$ language plpgsql;
No hay comentarios:
Publicar un comentario