Join Overview

If the query contains more than one table, STATISTICA Query will automatically create a join between two tables when it detects a relationship in the original database between two fields in different tables. A join shows how data is related between two tables and determines which records STATISTICA Query will return as data. For example, suppose one table has the weight of objects with their associated part number and another table has part numbers and their associated product names. A join specifies that the two part number fields are equivalent and allows weights and product names to be related.

Note that when you are in the Graphic Mode, all joins that are created are inner joins. Inner joins select only those records that have the same value in both of the joined fields of the selected tables. STATISTICA Query will then combine the matching records from each table and display them as only one case in the data that is returned to the STATISTICA Spreadsheet. If a record does not contain a matching record in the table to which it is joined, then neither record will appear as a case in the spreadsheet.

STATISTICA Query shows that two fields are joined by displaying a black line connecting the two tables with the join's operator displayed in the center of the line.

You can refine the external data that is to be returned to STATISTICA by specifying the operator that will be used to compare the data in the joined fields. See Join Operators for further details.

You can manually join two fields by selecting Add from the Join menu to display the Add Join dialog or by using your mouse to select a field in the Graphic pane and then dragging it to the corresponding field with which you want to create a join. By default, the join's operator will be = (equals). To edit the join's operator, double-click on the operator in the Graphic pane or select Edit from the Join menu to display the Edit Join dialog. It is also possible to specify other types of joins (i.e. outer and subtract joins), but you first need to be in the Text Mode of STATISTICA Query. See Additional Functionality Available in Text Mode for further details.