I think there is an error with the typecasting routine used to convert to a 
BIGNUM.  If you run the code below, you will see that you end up with a table 
where the BIGNUM column is filled with textual entries that are the command 
that fills them plus some extra garbage.  If you issue the UPDATE itest1 SET 
bigcol=intcol command from the command line instead of within the RMD file, the 
result is just the text of the command in the bigcol without the extra garbage. 
I'm going to report it via R:DCC.

SET VAR viloop INTEGER = 1
SET VAR virndval INTEGER = NULL

CREATE TABLE itest1 (intcol INTEGER,bigcol BIGNUM (11,0),realcol REAL,doucol 
DOUBLE)
WHILE viloop <= 1000 THEN
  SET VAR virndval = (RANDOM(1999999999))
  INSERT INTO itest1 (intcol) VALUES .virndval
  SET VAR viloop = .viloop + 1
ENDWHILE

UPDATE itest1 SET bigcol=intcol
UPDATE itest1 SET realcol=intcol
UPDATE itest1 SET doucol=intcol

CLEAR VAR viloop,virndval

RETURN

Jason Kramer
University Archives and Records Management
002 Pearson Hall
(302) 831 - 3127 (voice)
(302) 831 - 6903 (fax)


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Albert Berry
Sent: Tuesday, June 18, 2013 1:02 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: 9.5 and BigNum

I fooled around here, and came up with the following from data types:
BIGNUM maps to DECIMAL
DECIMAL maps to DOUBLE
so I made a dummy database using an invoices table from another database 
(59,000+ records)

ALTER TABLE Invoices ADD InvNoBig DOUBLE
UPDATE Invoices SET InvNoBig = InvNo -- ERROR
UPDATE Invoices SET InvNoBig = (FLOAT(InvNo)) -- ERROR
UPDATE Invoices SET InvNoBig = FLOAT(InvNo) -- Yeah!!!

Albert

On 18/06/2013 10:40 AM, Karen Tellef wrote:
> Good thought.  Nope, gives me the same thing
>
> Karen
>
>
>
> -----Original Message-----
> From: Albert Berry <[email protected]>
> To: RBASE-L Mailing List <[email protected]>
> Sent: Tue, Jun 18, 2013 11:36 am
> Subject: [RBASE-L] - Re: 9.5 and BigNum
>
> A thought on your try #2 - try FLOATing the invoice number when you do
> the update.
>
> UPDATE ... SET TestBigNum = (FLOAT(InvNo))
>
> That might get the update to work.
> Albert
>
>
>   > > Try #2: So I added a new column to the table TestBigNum (11,0). If
> I > type in a value, the "select ... = 1037005" works perfectly. So now
>   > to get the data over there... I tried: > UPDATE acctrec SET
> TestBigNum = InvNo > But I actually get the letters "NaN" in the column!
>   > > Anyone have a clue how to get these old values converted into a
> BigNum > that is searchable, or is this perhaps a bug (I've never used
>
> BigNum > before) > > Karen > > No virus found in this message. > Checked
> by AVG -www.avg.com  <http://www.avg.com>  <http://www.avg.com>
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2013.0.3345 / Virus Database: 3199/6420 - Release Date: 06/18/13
>


Reply via email to