Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 06 Aug 2004 @ 18:16:38 GMT


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


Subj:   LPAD functionality
 
From:   Donald Iuppa

Hi all,

I am still a newbie here - I'm looking for a string function like lpad.

     lpad(string text, length  integer [, fill  text])

text Fill up the string to length length by prepending the characters fill (a space by default). If the string is already longer than length then it is truncated (on the right).

     Select  lpad('hi', 5, 'xy')

Result: xyxhi


What is the best way to get this functionality in Teradata?

My exact problem is to convert an integer to a string with zero padding for a given length.


Thank You,

--Don



     
  <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