Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 20 Dec 2007 @ 10:52:44 GMT


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


Subj:   Re: LPAD similar function in teradata
 
From:   Michael Larkins

Should the following:

          > sel substr('          ',1,level) || (description) as descr

actually be something like:

     sel substr('                 ',1,level*5) || (description) as descr

That way when level is

     0 * 5 = 0 spaces
     1 * 5 = 5 spaces
     2 * 5 = 10 spaces

so on and so forth for each applicable level value


Regards,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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