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 |
|
hotshot_21
Yak Posting Veteran
97 Posts |
Posted - 2007-08-23 : 02:45:04
|
| i want to round off 0.23 to 0.25 ,i am trying it with round function but can't get it. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-23 : 03:33:55
|
declare @i decimal(5, 2)set @i = 0.23select 0.05 + @i - @i * 100 % 5 / 100 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-08-24 : 04:56:35
|
quote: Originally posted by Peso declare @i decimal(5, 2)set @i = 0.23select 0.05 + @i - @i * 100 % 5 / 100 E 12°55'05.25"N 56°04'39.16"
Server: Msg 206, Level 16, State 2, Line 5Operand type clash: int is incompatible with void typeServer: Msg 8117, Level 16, State 1, Line 5Operand data type numeric is invalid for modulo operator.MadhivananFailing to plan is Planning to fail |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-24 : 05:37:16
|
I am using SQL Server 2005. It works there.OP didn't state which version being used. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|