SMS Attribute Class Join operations are complex operations in which you specify how to combine data from two different attribute classes. While using the General tab and the Criteria tab in the Query Statement Properties dialog box, as soon as you use an attribute from an attribute class that is not yet in the query, a new join is created automatically for this attribute class.

Because suitable joins are automatically created when the query is built, you can regard the Joins tab in the Query Statement Properties dialog box as an advanced feature that typically you will not need. Nevertheless, there are certain kinds of queries that can only be expressed by manually entering new joins or modifying the ones that are automatically created. With the resulting expression, you specify how objects from these classes are related. For example, you can use a join to search for all discovery data items that have had hardware inventory collected (in WQL notation).

  Copy Code
select * from sms r system as r
INNER JOIN
sms g system SYSTEM as g
ON r.ResourceID = g.ResourceID

There are four types of attribute class joins, as described in the following table.

Join type Description

Inner join 

Displays only matching results — always used by joins that are created automatically

Left outer join

Displays all results for the base attribute and only the matching results for the join attribute

Right outer join

Displays all the results for the join attribute and only the matching results for the base attribute

Full join

Displays all the results for both the base attribute and the join attribute

Caution
Join operations are an advanced function of Microsoft SQL Server. Before configuring or modifying a join operation, you must have a good working knowledge of the Structured Query Language (SQL) syntax that is needed to create various types of table joins. For more information about join operations, see About Configuring Attribute Class Joins or your SQL Server documentation.

See Also