Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Oct 2001 @ 19:42:22 GMT


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


Subj:   Re: Count Function
 
From:   Kent Clay

Need a little more input.

If a sequence number is being used, what condition causes it to be used more than once?

If a seq nbr is being used to create a unique key, it indicates that col1 is not unique. Do the dupe seq nbrs have the same col1 value?

If you're looking for dupe seq nbrs only use:

Select seq_nbr, count(*)
From Blah
Group by 1
Having count(*) > 1

If you're looking for dupe col1/seq nbr combos use:

Select col1, seq_nbr, count(*)
From Blah
Group by 1, 2
Having count(*) > 1

KC



     
  <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