Kepware Knowledge Base: Solution
How Does the ODBC Client Driver Sort Data Returned from a Table?
Last Update: 11/7/2018
The way that returned data is sorted depends on the device format selected in the server and the specified data source format.
- For Fixed Table or Dynamic Table formats going directly to a data table, the returned record set is sorted by the key field as indicated by the table. Typically, the key filed is the record number.
- If the data source is a query or view within the database, then the returned record set is sorted according to the sort parameters within that query or view.
- If the format selected in the server is Query Table, then the sorting is inherited from the queried data source unless an OrderBy clause is used in the select statement.
Note: An example query statement is "Select * From Production.Products OrderBy Product_Name ASC".
©
2021
PTC Inc. All Rights Reserved.