Results 1 to 3 of 3

Thread: Strip 0

  1. #1
    Join Date
    Apr 2003
    Posts
    15

    Unanswered: Strip 0

    I have a table with some data in it. This colume holds project numbers that have some 0 at the beginning, I would like to strip the 0 off during the select how can I do this?

    For Example 00000390 should look like 390 when it's returned.


    Thanks!

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    This will work as long as all your project numbers are numeric:

    select cast(cast('00000390' as int) as varchar(8))

    blindman

  3. #3
    Join Date
    Apr 2003
    Posts
    15
    That worked !!!

    Thanks for all your help!

    Ken

Posting Permissions

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