Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 07 Apr 2009 @ 21:08:47 GMT


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


Subj:   Re: Sorting on Null Values
 
From:   Joseph D silva

  I'm using Teradata. I'm trying to Order by Name but do not want the Null values to be at the top. Can anyone let me know the syntax for This purpose?  


There's probably another way ... but this is what I could quickly think off ...

     Sel * form table1
        order by case when L_name is null then 1 else 0 end,
        L_name, case when F_name is null then 1 else 0 end,  F_name;

Joseph D'silva



     
  <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