Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

SQL Server Using Float Formats

$
0
0

I'm importing a field called that has a maximum value of 1 and a minimum of > 0 and < 1 into a sql server using SAS.

The original datasource was an excel spreadsheet.  SAS reads the value in as a Best12 format with a length of 8.

When I tried to load the data to a server table in SQL with a decimal (1,1) format, it rounds the numbers and throws the overall total count off from what I get when I sum up the number in Excel. 

I tried using decimal(1,2) and SAS says I need to specify a value < 2 in the format.

I ended up using float(4) as the format and the sum of the values matches what I have in Excel, but we have had some trouble with float formats in the past on projects and my peers are concerned that if I use the float format this will cause a problem later on.  We are using the data in an SSRS report.  I'm wondering what complications there might be to using this format...anyone know? 


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>