Special Formatting of Numbers
Assuming they are all ints and you always want the first three digits to appear before the decimal:

WITH n(r) AS (
  SELECT 123 UNION ALL SELECT 1234 UNION ALL SELECT 1234567
)
SELECT LEFT(r, 3) + CASE 
  WHEN LEN(r) &gt; 3 THEN '.' + SUBSTRING(RTRIM(r),4,38) ELSE '' END 
FROM n;