Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Hi All,My data is:1.3934113.181.955824.6267.457715.64660.88730275.353.45280.70973.97014.30139.25651.35338.14307.336542.45071.98961.41982.3594 1.4299What data type should I use and how many posts should be?This time use data type = numeric (18.4)This is not good.. Do I need to be increased to (18.8)?Please Help
slimt_slimt
Aged Yak Warrior
746 Posts
Posted - 2010-10-24 : 12:26:50
this is one thing you need to decide based on your business needs. How much are the decimals important for business. otherwise if you don't know in advance the how much decimals will there be i suggest you use datatype float.try this:
drop table test123create table test123(numF float,numD decimal(18,8))insert into test123select 1.2457436785634534,1.6543876597select * from test123
programer
Posting Yak Master
221 Posts
Posted - 2010-10-24 : 13:12:42
It is likely to float an ideal solution.This need for exchange rates.
quote:Originally posted by slimt_slimt this is one thing you need to decide based on your business needs. How much are the decimals important for business. otherwise if you don't know in advance the how much decimals will there be i suggest you use datatype float.try this:
drop table test123create table test123(numF float,numD decimal(18,8))insert into test123select 1.2457436785634534,1.6543876597select * from test123