PARTITION BY, HASH BY, and ORDER BY - Advanced SQL Engine - Teradata Database

SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
vjt1596846980081.ditamap
dita:ditavalPath
vjt1596846980081.ditaval
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata Vantageā„¢

If you have multiple ON clauses, you cannot specify ORDER BY as the only option in an ON clause. You must combine ORDER BY with a PARTITION BY (ANY), HASH BY, or DIMENSION clause.

If you specify an ORDER BY or LOCAL ORDER BY clause with PARTITION BY or HASH BY input, then the following is required:
  • All inputs must have the same number of ORDER BY columns.
  • The data types of the columns must be the same type or matched using implicit cast.