Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 01 Nov 2010 @ 19:20:29 GMT


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


Subj:   Re: Need Same Order as in input table
 
From:   Dieter Noeth

There is no order in a table, there is no "first" record, this is a basic rule in Relational Model.

If you want a repeatable result set you have to sort by some unique combination of columns, thus simply add Field4:

     Row_number() Over (Order By Field1, Field2, Field3, Field4 DESC)

Dieter



     
  <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