Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2011
    Posts
    24

    Unanswered: Convert Help Please!

    i have interest rates in format
    0.0527500
    0.0525000

    i need something like this for eg:

    Add leading zeroes(eg. 0.0527500 to be presented as 05275 and 0.0525000 to be presented as 05250)

    thanks in advance for help

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Formatting and presentation issues SHOULD be handled on the client, not within the database. You can do this, but you should not:
    Code:
    SELECT SubString(CAST(n AS VARCHAR), 3, 5)
       FROM (SELECT 0.0527500 AS n
          UNION ALL SELECT 0.0525000
          ) AS z
    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Nov 2011
    Posts
    24
    thanks Pat

Posting Permissions

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