enterprise architect - SQL query in Sparx EA returning multiple rows for tagged values -
i’m trying sql query return single row per attribute don’t have particular tagged value assigned them, or if have tagged value empty.
the query below returns after except returns multiple rows because of different tags assigned them. i’ve tried getting group work return single rows no avail.
select t_package.name subpackagename , t_object.name xtable , t_attribute.name attributename ( (t_package t_package_1 inner join (t_package inner join t_object on t_package.package_id = t_object.package_id) on t_package_1.package_id = t_package.parent_id) inner join t_attribute on t_object.object_id = t_attribute.object_id) left join t_attributetag on t_attribute.id = t_attributetag.elementid (((t_package_1.name)='x') , ((t_object.object_type)='class') , ((t_attribute.type) not 'tns:%') ) , (t_attributetag.property <> 'dm_fieldref' or (t_attributetag.property = 'dm_fieldref' , t_attributetag.value null)) order subpackagename, icptable, attributename;
just add distinct
select distinct t_package.name subpackagename, t_object.name xtable...
Comments
Post a Comment