|
|
Archives of the TeradataForum
Message Posted: Mon, 14 Apr 2003 @ 00:18:58 GMT
Subj: | | Re: How to implement the sequence concept in teradata |
|
From: | | McCall, Glenn D |
You have to be careful with Rank - Rank is not guaranteed to generate unique numbers indeed if the data in the columns specified in the
"order by" part of the rank function are repeated across multiple rows, you **will** get the same rank.
For example:
Select a, rank (a)...
Will generate something like the following:
A rank
Aa 1
Bb 2
Bb 2 <- Note that this rank is repeated.
Cc 4
Glenn Mc
| |