Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 13 Jun 2002 @ 06:10:13 GMT


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


Subj:   How to specify how many rows are to be returned by the SELECT statement
 
From:   Serge Hauswirth

In order to have only the first row returned by the SELECT, I tried the following statement :

SELECT JahrWoche , Lagerbestand
FROM NGT_Lagerbestand
WHERE ArtikelNr = '10011000' AND JahrWoche < 200217 AND Lagerbestand IS NOT NULL
ORDER BY JahrWoche DESC SAMPLE 1

But SAMPLE does not take any account of the ORDER BY Clause.

Is there a way to get the first row in a SELECT statement?



     
  <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