Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 27 Apr 2006 @ 10:12:05 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Executing the SQL Query based on Parameter
From:   Vijayaprasad_K

Hi All

I had a Product sales Table.I want to pick up the Second & Third maximum sales of products.

In oracle, we had a option called "&n" which will pop for enter the value for "n".Please look the query in Oracle...

sel sal from training_12 a where &n=(sel count(distinct (sal)) from training_12 b where a.sal>=b.sal);

Likewise in Teradata, what is the option suitable for it.

Thanks in Advance for Valuable reply.

Thank you


Vijaya Prasad Konakondla

  <Prev Next>  
Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020