473,325 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Text to Long integer - digits after decimal lost

I changed the Fieldsize Property from text to Long Integer and Decimal
Places = 6.

I had decimals in the original field. But after the transfer, the
digits after the decimals are gone.

Now even after I have change the Fieldsize propert to Decimal with
Scale = 2, the digits after the decimal are not seen.

For eg. If the text was 16.27. After I changed to long integer, it
changed to 16. Now when I convert to decimal it is still 16. The digits
after the decimal point are lost.

Does anyone know if there is a way I can get those digits back?

Thanks,
Ken

Nov 13 '05 #1
4 9700
"italia" <it*****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I changed the Fieldsize Property from text to Long Integer and Decimal
Places = 6.

I had decimals in the original field. But after the transfer, the
digits after the decimals are gone.

Now even after I have change the Fieldsize propert to Decimal with
Scale = 2, the digits after the decimal are not seen.

For eg. If the text was 16.27. After I changed to long integer, it
changed to 16. Now when I convert to decimal it is still 16. The digits
after the decimal point are lost.

Does anyone know if there is a way I can get those digits back?

Thanks,
Ken


I don't think there is any way to recover (other than from a backup). Long
Integers are integer values - ALL fractional values are discarded.

--
Randy Harris
(tech at promail dot com)

Nov 13 '05 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A Long Integer doesn't have decimal places; therefore, when you
converted the text to the Long the decimal places were dropped. Since
Long's don't have decimal places, when you change the Long to a Decimal,
there weren't any decimal places to convert to the Decimal.

Instead of

String -> Long -> Decimal

Do

String -> Decimal

This should preserve you decimal places.

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQji+GYechKqOuFEgEQKzSwCgg5bUNcx9XRYU1tCW69gfPp 41y84AnjPS
OKOUx0EhCjsGFqJZk5lFhfTx
=SvTQ
-----END PGP SIGNATURE-----
italia wrote:
I changed the Fieldsize Property from text to Long Integer and Decimal
Places = 6.

I had decimals in the original field. But after the transfer, the
digits after the decimals are gone.

Now even after I have change the Fieldsize propert to Decimal with
Scale = 2, the digits after the decimal are not seen.

For eg. If the text was 16.27. After I changed to long integer, it
changed to 16. Now when I convert to decimal it is still 16. The digits
after the decimal point are lost.

Does anyone know if there is a way I can get those digits back?

Thanks,
Ken

Nov 13 '05 #3
Good lesson learned.
If I choose Long Integer as the field size in the design view, it gives
me an option for decimal places. What would be this for? This got me
confused.

Nov 13 '05 #4
italia wrote:
Good lesson learned.
If I choose Long Integer as the field size in the design view, it
gives me an option for decimal places. What would be this for? This
got me confused.


MS stupidity. Every other database designates all of the numerical types as
TYPES. In Access MS decided to lump them all in the type "Number" and use the
field length to distinguish them. You're absolutely correct that it is
confusing.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Peter Blatt | last post by:
Does 5 represent the total numer of digits (including the fractional portion) or only the number of places BEFORE the decimal point? Moreover does the number include the decimal point? Are there...
7
by: William Payne | last post by:
Hello, I have a variable of type unsigned long. It has a number of bits set (with set I mean they equal one). I need to determine those bits and their position and create new numbers from them. For...
5
by: Michael Hill | last post by:
Hi, folks. I am writing a Javascript program that accepts (x, y) data pairs from a text box and then analyzes that data in various ways. This is my first time using text area boxes; in the past,...
3
by: JK | last post by:
This is an easy one, but I'm a JS newbie. I want to write a function that determines input value. If 0 - 100 than will use input as % (i.e., 3 would become .03 and used for calculations);...
2
by: Todd_M | last post by:
I was wondering what anyone might suggest as "best practice" patterns for streaming out fixed formatted text files with C#? Let's say we get our data in a dataset table and we need to iterate over...
1
by: TC | last post by:
I am getting small math errors when I use a query to convert a column's data type from Text to Single. I am using a calculated column with the following expression. HighSchoolGPA:...
11
by: Ole Nielsby | last post by:
First, sorry if this is off-topic, not strictly being a C++ issue. I could not find a ng on numerics or serialization and I figure this ng is the closest I can get. Now the question: I want...
5
by: helPlease | last post by:
By long integer i mean very large number(say of 20 digits).If i store it in a character array then what mechanism shud i follow to multiply two such numbers.Could Booth's algo. be applied.Or if...
11
by: Steven Woody | last post by:
long i = nnn; long j; double d; d = i; j = ( long )d; in this case, i == j ? thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.