Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 23 Jun 2006 @ 18:23:15 GMT


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


Subj:   Can't get ROW_NUMBER to Work
 
From:   Rick.Tangri

Hi,

I need to add a counter to this query. I was thinking just to add this line:

     ROW_NUMBER() OVER (PARTITION BY E.column1 ORDER BY 2)

For some reason this doesn't work- I get ones in the new column. I can't use a subquey, temp table or add the results to a view because I am using the query in a reporting software. Please advise.

Thanks!

     Select
     E.Column1
     Count(E.Column1) AS Column2

     >;From
     Table1 F Inner Join Table2 A ON
     F.Column3= A.Column3

     Inner Join Table4 E ON
     A.Column5 = E.Column5

     Group By
     E.Column1

     Where
     (A.Date Between '2006-01-01' AND '2006-01-31')

     Order By 2 DESC


     
  <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