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 Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008