Tuesday, December 1, 2009

SQL Query: Removing leading zeroes from SQL Server field

The SQL Query for Removing leading zeroes from SQL Server field

The following SQL Query removes the leading zeroes from "Field" field

Select replace(ltrim(replace(Field1, '0', ' ')) , ' ', '0') FROM TestTable


 

1 comment:

  1. Hey pal, you saved my day :)
    Thanks a ton!!

    ReplyDelete