Akanksha Akanksha - 4 months ago 46
MySQL Question

Enterprise Architect: My SQL query to fetch Package/Element based on Tagged Value

I have to write a query in C# Addin: to fetch Element\Package that has particular value for a specified tagged value.

Something like:

String query=SELECT "package" FROM t_package WHERE package.taggedValue="123";

I have defined a tagged value by name "UUID" and I am setting its value.From my model I want to fetch the particular package or element whose UUID value is 123.

Please guide how can I write this query or is there any other optimized way to do the same.

Thanks in Advance.


You can get all the details(element or package)in t_object table .Try the below query

select t_Object.Name from t_object 
 inner join t_objectproperties on t_object.Object_ID = t_objectproperties.Object_ID
 where t_objectproperties.Property="UUID"
   and t_objectproperties.value="123"

Hope it works .!