ORDER BY - spectrum_spatial - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2026-02-13
ft:lastPublication
2026-02-13T17:17:07.540000
L1_Product_Gateway
Locate
L2_Product_Segment
Location Intelligence
L3_Product_Brand
Precisely Spectrum Spatial
L4_Investment_Segment
LI Enterprise
L5_Product_Group
Enterprise LI
L6_Product_Name
Spectrum Spatial

ORDER BY allows you to sort the results of a query in ascending or descending order.

ORDER BY is specified by the column name or an integer representing the column in the order it is listed in the query. Use the integer when you don't know the column name returned from an expression. ORDER BY must also be a constant, not an expression. ORDER BY supports multiple columns and integers.

ORDER BY is not sorted on columns as they exist in the table but how they are listed in the select statement. If the query is to return results using alias names for the columns, ORDER BY will be done on the alias names.

SELECT state,city, hhinc, pop  FROM table ORDER BY state ASC, city ASC

Spectrum Spatial handles null values in an ORDER BY or ORDER BY <ASC> by adding them at the bottom of the list of results. ORDER BY <DESC> will return the values at the top. This behavior applies to all supported data source providers, except TAB where null values are not applicable.

ORDER BY can be delegated to a data source provider if the data provider supports it. For more on delegation, see Delegation Rules: ORDER BY.

ORDER BY can still be delegated even if the WHERE clause cannot be delegated.