Hi Damon,
I just set up a test table with two columns and populated it as you had
then ran this UPDATE command:
update test set int1 to (real1*10000)
and here is what I got:
R>sel real1 int1 from test
real1 int1
-------- ----------
0.0599 599
0.06 600
0.0601 601
0.0689 689
0.0699 699
0.07 700
0.0701 701
I have seen your dilemma when using certain spreadsheets that shall
remain nameless. Since your data has trailing zeros I wonder if you are
viewing the data with a spreadsheet. If you are, it may be the
spreadsheet not Rbase. Maybe try again?
Dave Fitts
State of Maine
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of Gray,
Damon
Sent: Friday, May 15, 2009 4:05 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Conversion peculiarity
Let's suppose we have a table with a REAL and an INT, and let's lay it
out left to right as below:
REAL1 INT1
.0599 NULL
.0600 NULL
.0601 NULL
.0698 NULL
.0699 NULL
.0700 NULL
.0701 NULL
Now, let's use the update command to set INT1 to the value of REAL1 *
10000. What would you expect? Well, I expect something other than what
I'm getting. The results are as follows:
REAL1 INT1
.0599 599
.0600 599
.0601 601
.0698 697
.0699 698
.0700 700
.0701 701
What gives??
wwwww
( @ @ )
-------oOO---(_)---OOo-------
Damon J. Gray
Anvil Corporation Business Services
(360) 937-0770
oooo0 0oooo
( ) ( )
----------\ (----) /-----------
\__) (__/