Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 May 2006 @ 14:42:18 GMT


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


Subj:   Re: Difference in row counts while using subquery
 
From:   Prescott, Kyle

Your sort is causing the issue. Add the partitioning columns into the sort along with C10 and you should return the correct result. The sorting by only C10 can throw the partition breaks off and you can return incorrect (seemingly random) results.

     QUALIFY ROW_NUMBER ()
           OVER ( PARTITION BY C8,C9, ORDER BY c8,c9,C10) = 1

Kyle Prescott
UnumProvident



     
  <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