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 |
|
tvspsekhar
Starting Member
20 Posts |
Posted - 2010-03-24 : 22:54:50
|
| please help me in coorecting the programdeclare @a as int,@b as int,@c as int,@temp varchar(50)set @a=100set @b=230set @c=(@a/@b)set @temp = 'value of c='+CONVERT(varchar, @c)print @temp --'value of c=',@c ( answer should be 100/230 = 0.434783)but on execution the answer is: value of c=0tvspsekhar |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2010-03-25 : 00:25:34
|
[code]declare @a as int,@b as int,@c as decimal(10,4),@temp varchar(50)set @a=100set @b=230set @c=(@a * 1.0/@b)set @temp = 'value of c='+CONVERT(varchar(10), @c)[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|