Results 1 to 3 of 3

Thread: Padding Strings

  1. #1
    Join Date
    Aug 2004
    Posts
    19

    Unanswered: 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

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •