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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Float varible gives result in scientific notation ................Urgent.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-27 : 10:38:10
Santosh writes "Hi,

We use SQL server-2000 SP-2 on Windows 2000 server(SP-2).

We have field -

FieldName DataType Length
LowerLimit Float 8

We entered data 8888888888888888888888888888888 (31 - 8's) in field.

We retrive this field using SELECT LowerLimit FROM <Table_Name> it gives result as 8.8888888888888884E+30 (Scientific notation.) we donot want result in scintific form. We wish to get back same number (31 - 8's).

We tried various combinations of CONVERT and CAST but could not achieve desired output.

Please suggest solution.

Thanks."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-02-27 : 11:37:23
You will not be able to use float if you need that level of precision; float only has 15 digits of available precision. You need a numeric or decimal datatype for anything more. You can achieve up to 38 digits with these dataypes (you may need to change some server settings in order to use more than 28 digits). Books Online will detail the maximum precision settings needed.

Go to Top of Page
   

- Advertisement -