|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
Louis
Where do you run it? Access or SQL Server? "Louis" <Louis@discussions.microsoft.com> wrote in message news:53AC65F9-3BF7-45B9-A068-32C5B58F44EB@microsoft.com... >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. > |
|
![]() |
| Outils de la discussion | |
|
|