| Author |
Topic |
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-01-02 : 00:09:19
|
| hi. every one can u help this my question is select 55/8answer is 6i want my answer in fractions also can u help this |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-02 : 00:14:12
|
| Use this:-select 55/CAST(8 AS float) |
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-01-02 : 00:17:13
|
| thank u |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-01-02 : 00:21:43
|
integer divide by integer will give you back the result in integer.use select 55.0 / 8 or select 55 / 8.0. As long as anyone of the numerator or denominator is a decimal value, SQL Server will convert the integer to decimal and compute it and the result will be in decimal. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-01-02 : 00:29:57
|
| thank u |
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-01-02 : 01:06:05
|
| can u help without using cast |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-01-02 : 01:13:53
|
| use khtan's soln |
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-01-02 : 01:18:18
|
| can u help without using cast and also not using 55.0 and 8.0 |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-01-02 : 01:20:51
|
quote: Originally posted by raky can u help without using cast and also not using 55.0 and 8.0
use convert() ? What is your consideration ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2008-01-02 : 01:28:37
|
| thank u |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-02 : 05:08:26
|
quote: Originally posted by raky can u help without using cast and also not using 55.0 and 8.0
Multiply numerator by 1.0select 8*1.0/5MadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-01-02 : 06:00:58
|
quote: Originally posted by madhivanan
quote: Originally posted by raky can u help without using cast and also not using 55.0 and 8.0
Multiply numerator by 1.0select 8*1.0/5MadhivananFailing to plan is Planning to fail
Multiply denominator by 1.0  KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-02 : 07:05:23
|
Whatever it is MadhivananFailing to plan is Planning to fail |
 |
|
|
|