![]() |
|
![]() |
![]() |
Archives of the TeradataForumMessage Posted: Wed, 09 Dec 2009 @ 16:59:07 GMT
Row_Number() in Teradata is a window aggregate function. As such, you need to provide it a "window", so to speak. UPDATE database.table SET MyRowId = ROW_NUMBER() OVER (ORDER BY You could also partition by a set of fields as well if you want the Row_Number to restart after a group of fields values change: UPDATE database.table SET MyRowId = ROW_NUMBER() OVER (PARTITION BY Hope this helps. There is more information available about using window aggregate functions in the Teradata Manuals.
| ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||