If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Padding Strings

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-01-04, 09:14
atmosphere atmosphere is offline
Registered User
 
Join Date: Aug 2004
Posts: 19
Padding Strings

Is there a way to pad the front and back of strings with spaces?

NOTE: I do not want to concatenate with a fixed string, Im looking for a function something like where you can input a number and a string and the string will be repeated that many times

thanks
Reply With Quote
  #2 (permalink)  
Old 09-01-04, 09:21
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
I think you are going to have to write your own UDF to accomplish that.

If it was just padding on the back, you would just cast/change it to a char

Andy
Reply With Quote
  #3 (permalink)  
Old 09-01-04, 18:26
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
I guess you are looking for a function like REPEAT

Refer the documentation to make sure this suits your requirements

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On