Results 1 to 2 of 2

Thread: how to take off leading zero

  1. #1
    Join Date
    Oct 2002
    Location
    queens
    Posts
    139

    how to take off leading zero

    I have fields like '0006','0007','0004'
    etc. I need to convert this in 4 char field as right justify 6,7,4. How would I do that?

    Another question:

    fields in input file as 77,77.0,77.90,77.99,

    I need to show them right justify in 10 chars field as 77.00,77.00,77.90 and 77.99
    How would I do that?

    Please help!!!!!!!!!

    Thanks in advance!!

  2. #2
    Join Date
    Oct 2002
    Location
    UK
    Posts
    10
    How about

    select str(convert(int,'0004'),4,0)

    select str(77,10,2), str(77.79,10,2)

Posting Permissions

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