Thursday, October 10, 2013

Left padding with zero in sql

  SELECT RIGHT(REPLICATE('0',10) + CAST(isnull(cast(56589 as decimal(8,2)),0) AS VARCHAR(10)),10)

No comments:

Post a Comment