You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE OR REPLACE FUNCTION getad_ref_list_name_bycolumnname(
tablename character varying,
columnname character varying,
value character varying,
language character varying DEFAULT NULL::character varying)
RETURNS character varying AS
$BODY$
SELECT coalesce(rl_trl.Name, rl.Name)
from AD_Reference r
inner join AD_Column c on (c.AD_Reference_Value_ID = r.AD_Reference_ID and c.AD_Reference_ID = 17)
inner join AD_Table t on (t.AD_Table_ID = c.AD_Table_ID)
inner join AD_Ref_List rl on (rl.AD_Reference_ID=r.AD_Reference_ID)
left join AD_Ref_List_trl rl_trl on (rl_trl.AD_Ref_List_ID=rl.AD_Ref_List_ID and rl_trl.AD_Language=$4)
where true
and lower(t.tablename)=lower($1)
and lower(c.columnName) = lower($2)
and lower(rl.value) = lower($3)
$BODY$
LANGUAGE sql STABLE
COST 100;
Usage:
select getad_ref_list_name_bycolumnname('m_product', 'producttype', 'I')
The text was updated successfully, but these errors were encountered: