472,328 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 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 9593
"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...
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...
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...
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...
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...
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...
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...
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...
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: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.