Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / July 2008

Tip: Looking for answers? Try searching our database.

Storing a number with potential decimal digits

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Louis - 15 Jul 2008 17:05 GMT
I am new to MSSQL and I was set up to access this server so I can store data
in it, either through ColdFusion or MS Access. Not sure about the version of
MSSQL.

My problem: Among other fields, I have two similar fields which are numbers
with 0,1 or 2 decimal digits. For example, the first field (normally) has 7
digits to the left of the decimal point -> 1234567.1, or 1234567 or
1234567.12.
The second field is similar but with 6 digits -> 123456.1, or 123456 or
1234567.12.

I tried different data types and they seem to give me the same results when
looking at it through MS Access ODBC:
I used decimal(10,2) for both and the result is the first field's data is
truncated, ie it always comes back as 1234567 while the second field is OK.

If I dropped a digit in Access in the first field and add a digit, then it
accepts it.

Why is this happening? I would think the number of digits I declared would
be sufficient.

Appreciate for any comment or suggestions.
Uri Dimant - 16 Jul 2008 07:28 GMT
Louis
Where do you run it? Access or SQL Server?

>I am new to MSSQL and I was set up to access this server so I can store
>data
[quoted text clipped - 25 lines]
>
> Appreciate for any comment or suggestions.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.