Removing Leading Zeros Using SQL

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kumu

    Removing Leading Zeros Using SQL

    Hi, Is there a way to write an update statement to remove leading
    zeros from a column? The column is a varchar field and the number of
    zeros vary.
    Thanks in Advance
  • Ken Denny

    #2
    Re: Removing Leading Zeros Using SQL

    forlist2001@yah oo.com (kumu) wrote in news:a44abd39.0 310310826.2a8a7 3a5
    @posting.google .com:
    Hi, Is there a way to write an update statement to remove leading
    zeros from a column? The column is a varchar field and the number of
    zeros vary.
    Thanks in Advance
    UPDATE table
    SET column=LTRIM(co lumn,'0');

    --
    Ken Denny

    Comment

    • kumu

      #3
      Re: Removing Leading Zeros Using SQL

      Thanks Ken

      Comment

      Working...