Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Vack
Aged Yak Warrior
530 Posts |
Posted - 2014-03-21 : 09:19:03
|
I'm creating a view and in my select statement I need to add trailing zeros. Field is a cost field. May have values like: 21.21.240.883I need those to be:2.0000001.2000001.2400000.883000 |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2014-03-21 : 10:59:20
|
use convert to numeric --> Convert(numeric(7,6),Field/Calculation), select convert(numeric(7,6),1.2) --If there is always one digit to the left of decimal with the precision upto six digits, else adjust the numeric(n,n) as required.CheersMIK |
|
|
|
|
|