Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 27 Apr 2006 @ 11:55:53 GMT


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


Subj:   Re: Executing the SQL Query based on Parameter
 
From:   Hanif Bapu

Vijay,

You can use Row_Number which is an OLAP function in V2R5

If you looking for various products and would like the 2nd and 3rd values for each product

     Select Product, Sales_Am
     >From SalesProd_Table
     Qualify Row_Number () Over (Partition by Product Order by Sales_AM Desc)
     in (2,3)

Hope this Helps.

HB
Datawarehouse Analyst
TNT Express ICS



     
  <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