| Author |
Topic |
|
renu
Starting Member
47 Posts |
Posted - 2007-09-28 : 02:58:59
|
| how to round the exponential values.for example my input is 8.14444367893246e-4my expected output should be 8.14444367893246how to achieve this? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-28 : 03:07:55
|
quote: Originally posted by renu how to round the exponential values.for example my input is 8.14444367893246e-4my expected output should be 8.14444367893246how to achieve this?
What is the logic behind this?Do you want to omit exponential part from the input?MadhivananFailing to plan is Planning to fail |
 |
|
|
Koji Matsumura
Posting Yak Master
141 Posts |
Posted - 2007-09-28 : 03:10:54
|
| Why not 0.000814444367893246? |
 |
|
|
renu
Starting Member
47 Posts |
Posted - 2007-09-28 : 03:12:14
|
| yes i want to remove the exponential part alone rest values should be the same |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-28 : 03:17:50
|
quote: Originally posted by renu yes i want to remove the exponential part alone rest values should be the same
No Logic?declare @s varchar(50)set @s='8.14444367893246e-4'select @s,left(@s,charindex('e',@s)-1)MadhivananFailing to plan is Planning to fail |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-09-28 : 03:35:49
|
You need to convert it to scientific first for all cases, or0.814444367893246 and 8.14444367893246 will fail. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-28 : 04:08:27
|
quote: Originally posted by Peso You need to convert it to scientific first for all cases, or0.814444367893246 and 8.14444367893246 will fail. E 12°55'05.25"N 56°04'39.16"
Yes it is. But Still I dont understand why OP wants omission instead of conversion MadhivananFailing to plan is Planning to fail |
 |
|
|
renu
Starting Member
47 Posts |
Posted - 2007-09-28 : 04:33:31
|
| i have to execute set of function in sql .in that in a paricular part i have to perform thos calculation.2/2500 the result set wil be 0 generally. but in scientific method i should get the output as 8.13333333333e-4(its just an example value).but my output should be 8.13333333333 alone.do u got the scenario. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-28 : 04:40:21
|
2/2500 is .000800 MadhivananFailing to plan is Planning to fail |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-09-28 : 04:54:13
|
How to convert 81.3333333333?81.3333333333 in scientific notation equals 8.13333333333e1 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
renu
Starting Member
47 Posts |
Posted - 2007-09-28 : 04:56:18
|
| ok let it be as 2/2456.. |
 |
|
|
|