Wednesday, August 12, 2020

D2 - Dictionary

#Dictionary Values(Display Values -Key)

#=====================================================

select v.object_name as name,d.alias_name as alias, v.alias_value as val from d2_dictionary d,d2_dictionary_value v where d.object_name = v.dictionary_name and d.object_name = '{dictionary_name}' and  v.i_position=d.i_position  enable (ROW_BASED);

 

select v.object_name as name,d.alias_name as alias,v.alias_value as display_value from d2_dictionary d,d2_dictionary_value v where d.object_name = v.dictionary_name and d.object_name = '{dictionary_name}' and v.object_name='{site}' and  v.i_position=d.i_position enable (ROW_BASED);

 

#Dictionary Values (Alias Values)

#=====================================================

select v.object_name as name,v.alias_value as display_value from d2_dictionary d,d2_dictionary_value v where d.object_name = v.dictionary_name and d.object_name = '{dictionary_name}' and d.alias_name='{alias_name}' and  v.i_position=d.i_position order by 1 enable (ROW_BASED);

 

#Taxonomy with 2 dictionary levels

#=====================================================

select distinct d2.object_name as name, d2.locale_value as display_value from d2_taxonomy t, d2_dictionary_value d1, d2_dictionary_value d2, dm_relation r1, dm_relation r2 where t.object_name = '{taxonomy_name}' and r1.parent_id = t.r_object_id and r1.child_id = d1.r_object_id and r1.relation_name = 'D2_TAXONOMY' and d1.object_name = '{value}' and r2.parent_id = d1.r_object_id and r2.child_id = d2.r_object_id and any d2.locale_value != ' ' order by 1 enable(row_based)

No comments:

Post a Comment