• Here is one more

    with t(v) as ( select '0008.22816' union all select '069.3142' )

    select

    [formattted] =

    replace(str(parsename(t.v,2),7),' ','0') + '.' +

    replace(str(parsename(t.v,1),7),' ','0'),

    *

    from t

    Also, be aware that all presented solutions will fail or loose data if there will be more than 7 digits.

    To avoid it some extra moves should be done.


    I am really sorry for my poor gramma. And I hope that value of my answers will outweigh the harm for your eyes.
    Blog: http://somewheresomehow.ru[/url]
    Twitter: @SomewereSomehow