Re: MOD function for INT8
Posted in 2007
I have the table and contents, create table "informix".abc_test ( id int8, name char(10) not null , dt datetime year to second primary key (id,name) constraint "informix".abc_test_pk ); id name dt 4294967297 haha 2007-03-29 19:06:07 4294967298 haha 2007-03-29 19:06:07 8294967298 haha 2007-03-29 19:06:07 8294967295 haha 2007-03-29 19:06:07 8294967296 haha 2007-03-29 19:06:07 if you run, select mod(id,4294967296) from abc_test ; select mod(id,CAST(4294967296 AS INT8)) from abc_test ; you will get, (expression) 0 0 3999999999 4000000000 4000000002 (expression) 0 0 3999999999 4000000000 4000000002 Is this OK? IDS10 UC5 AIX 5.3 Thanks, Frank On 3/28/07, san <san@inist.ru> wrote: > > Have some strange result: > > SELECT MOD(source, 4294967296) FROM some_table > > always returns 0 regadless of source value, where > source is INT8 with values more than 4294967296, > 4294967296 is MAX_UINT > > If I replace 4294967296 with 4294967295 or 4294967297, it works right. > > I use IDS 9.40 UC2 on Suse Linux 9.2 > > > > -- > Andrew Svihnushin > Email: san@inist.ru > Software developer, INIST Ltd. > > > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list >