|
Archives of the TeradataForumMessage Posted: Mon, 06 Oct 2002 @ 22:25:32 GMT
Both Rank and CSUM can generate sequential numbers. The is a potential problem with rank in that it may generate duplicate numbers. CSUM does not. In the event that two or more records have the same values in the sort key RANK will assign the same rank to those records. For example Select a, b, csum (1, a), rank (1, b asc) from t order by a; Will give the following: a b CSum Rank 1 1 1 1 2 2 2 2 3 2 3 2 4 3 4 4 Regards Glenn Mc
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||