By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,694 Members | 2,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,694 IT Pros & Developers. It's quick & easy.

Text to Long integer - digits after decimal lost

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
"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

P: n/a
-----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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.