


This is the sole query optimization logic at work when you're using file geodatabase data with this tool. However, if this would result in querying Table2 on a nonindexed field, and reversing the order would result in querying Table1 on an indexed field, the order will be reversed in an attempt to maximize performance. For example, if Table1 is listed before Table2, Table2 will be joined by getting a row from Table1, then getting matching rows from Table2. When input tables are from a file geodatabase, tables generally join in the order listed in the Input Tables parameter. If an SQL expression is used but returns no matching records, the output feature class will be empty.įeature classes can be joined, but the fields list must contain at most one field of type geometry.įor details on the syntax for the Expression parameter, see SQL mode. You can choose several fields from the key fields list if the combination of these fields is needed to define unique values. Without an ObjectID field, selections will not be supported. This information defines how rows are uniquely identified and is used to add a dynamically generated ObjectID field to the data. The tool allows you to provide a key field option and key fields list. The order of the fields in the field list is the order the fields will appear in the output layer or table view. MakeQueryTableOLEDB.py Description: Create a query table from two OLE DB tables using a limited set of fields and establishing an equal join.
#Esri make query table tool 10.5 how to#
If the output result is a layer, it can be persisted to a layer file using the Save To Layer File tool or to a feature class using the Copy Features tool. MakeQueryTable example 2 (stand-alone script) The following script is an example of how to use the MakeQueryTable tool in the Python scripting environment. If a Shape field is added to the field list, the result is a layer otherwise, it is a table view. The layer that is created by the tool is temporary and will not persist after the session ends unless the document is saved.Īll input feature classes or tables must be from the same input workspace.
