Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 14 Apr 2003 @ 00:18:58 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


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



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023