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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-07-14 : 08:57:14
|
| fxb writes "Is there a way in SQL to set up a view that will show 17.1 as 17.10 (I want the decimals to be aligned)? For example:BEFORE -> AFTER 25.01 as 25.01 17.1 as 17.10 2.6 as 22.601.1 as 1.1010.22 as 10.22Thanks for your help.FXBSQL Server 8.0Windows XP" |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-07-14 : 09:01:59
|
| convert(decimal(7,2),mycol)==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-07-14 : 09:03:18
|
| declare @a decimal(8,1)set @a = 17.1Print @aprint convert(decimal(8,2), @a)Srinika |
 |
|
|
humanpuck
Yak Posting Veteran
94 Posts |
Posted - 2006-07-14 : 09:05:13
|
| select convert(decimal(5,2),1.10) |
 |
|
|
|
|
|