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 |
ippsioppsi
Starting Member
6 Posts |
Posted - 2008-04-01 : 12:23:09
|
Hello,I have a table with a lot of floating point data on it.I need to retrieve them calling a store procedure from a visual basic application, in xml format. Everything works fine, except that I get them in a scientific format: i.e 8.9999999999999993E-3Is there any settings to put at store procedure level to get the results in a non scientific format ?(0,009 in the example above) I would prefer to avoid formatting all the fields one by one if it is possible.Any help would be appreciated,thank you for reading.Ippsi |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-01 : 12:30:05
|
Try using CONVERT function.http://doc.ddart.net/mssql/sql70/ca-co_1.htm |
 |
|
ippsioppsi
Starting Member
6 Posts |
Posted - 2008-04-01 : 18:47:38
|
Ok,but then I need to use it for each field!Since my tables are huge, they have kind of 50 fields, I use to select all the fields with a simple "select * from table"now I should use "select convert(field1...), convert(field2), etc etc from tableI thought there was a kind of setting at store procedure level to set the format of all float fields as "non scientific" thank you |
 |
|
Imukai
Starting Member
29 Posts |
Posted - 2008-04-03 : 07:32:59
|
Visual basic help is out of scope for this forum, but you could convert the numbers from the resultset as you use them in your application. In visual basic, the CDbl() command will convert a scientific notation into a double just fine. |
 |
|
|
|
|