Skip to Content.
Sympa Menu

freetds - Problems with float data type in MSSQL7

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: cbone AT newroadstelecom.com
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Problems with float data type in MSSQL7
  • Date: Thu, 23 Aug 2001 01:16:45 -0400


I am using FreeTDS with Perl on Redhat 7.1 on an Intel platform.
I am having a problem when selecting float data from a mssql7 database.

If the data in the table is not rounded, my Perl script will return the
data without any problem.

If the data in the table is rounded, then the Perl script returns it with
the second decimal place truncated.

Example One:
Table data = 79.129999999999
Statement = 'select float_data from nonrounded_table'
Result using freetds and perl = 79.13

Example Two:
Table data = 79.13
Statement = 'select float_data from rounded_table'
Result using freetds and perl = 79.1

As you can see in the second example, the resulting data is truncated.

Any help would be greatly appreciated.



  • Problems with float data type in MSSQL7, cbone, 08/23/2001

Archive powered by MHonArc 2.6.24.

Top of Page