Author Topic: SQL command - Tag Value  (Read 533 times)


  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
SQL command - Tag Value
« on: September 02, 2018, 06:56:22 pm »
I want to know if there is a way to get a line in the result if I have only some of the field's values and not all of them.
I currently have 4 fields, and I want to find a line that has to assume only 3 results
the fields that i'm talking about is TAG VALUES.
i did put '' in place that the value there is empty but it is not work, please help.

this is my command right now:

SELECT o.ea_guid AS CLASSGUID, o.object_type AS CLASSTYPE, o.Name AS ObjectName,o.object_type as ObjectType,tv.Property as TagName, tv.Value as TagValue,
sv.Property as TagName1, sv.Value as TagValue1,
dv.Property as TagName2, dv.Value as TagValue2,
fv.Property as TagName3, fv.Value as TagValue3, AS PackageName, AS Package_level1, AS Package_level2, AS Package_level3, o.Alias
FROM ((((((((t_object o
inner join t_objectproperties tv on tv.Object_ID = o.Object_ID)
inner join t_objectproperties sv on sv.Object_ID = o.Object_ID)
inner join t_objectproperties dv on dv.Object_ID = o.Object_ID)
inner join t_objectproperties fv on fv.Object_ID = o.Object_ID)
INNER JOIN t_package package ON package.Package_ID = o.Package_ID)
LEFT JOIN t_package package_p1 ON package_p1.package_id = package.parent_id)
LEFT JOIN t_package package_p2 ON package_p2.package_id = package_p1.parent_id)
LEFT JOIN t_package package_p3 ON package_p3.package_id = package_p2.parent_id)
tv.Value like 'R' AND sv.Value like 'P' AND dv.Value like '' AND fv.Value like 'DEV'
AND o.Package_ID IN (#Branch#)


  • EA Administrator
  • EA Guru
  • *****
  • Posts: 7212
  • Karma: +83/-10
    • View Profile
Re: SQL command - Tag Value
« Reply #1 on: September 03, 2018, 09:19:54 am »
You need to use is null in conjunction with the left join.