Re: Informix creating decimal(42) data type.
Posted in 1994
>
> Core dumps are bugs unless caused by a core-dumping signal sent
> by a user -- I assume this is not the case here. (kill -6 PID
> is an example of a core-dumping signal).
>
> What version of the software are you using?
>
> Yours,
> Jonathan Leffler (johnl@godzilla)
>
Jonathan,
catting $INFORMIXDIR/etc/SE-cr
INFORMIX-SE Version 5.00.UD1
Copyright (C) 1984-1991 Informix Software, Inc.
catting $INFORMIXDIR/etc/ISQL-cr
INFORMIX-SQL Version 4.00.UH1
Copyright (C) 1984-1990 Informix Software, Inc.
I found a mistake or two in the original post. The mistakes were in
the second create view statement. Below is the correct version of
the view statements.
{drop view stdev1;
create view stdev1 (spropcd, number, y1, y2)as
select
spropcd [1,25],
count(*) number,
sum(spropval*spropval) y1,
sum(spropval)*sum(spropval) y2
from statview
group by 1;}
create view stdev2 (desc, y1, y3)as
select
spropcd,
y1,
y2/number
from stdev1
I must have been typing the post from memory, obviously with some
parity errors.
I have discovered some additional information.
This behavior (i.e. segmentation error, core dump) exists on
System V/386 Release 3.2; with SE 5.00 as well.
Furthermore, if I mutliply y2 by the inverse of number (i.e. 1/number)
I recieve the same kind of response. However, if I use the syntax;
y2 * (1/number)
y3 gets created as a decimal(32), and all is well.
Hope this helps.
==========================================================================
== George Teachman ==
== Soil Scientist ==
== United States Department of Agriculture - Soil Conservation Service ==
== Fort Collins, Colorado ==
== 303-282-1960 ==
== ==
== george@talon.ftc.scs.ag.gov ==
== ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ==
== Welcome to earth, third rock from the sun. Cause and effect. ==
== There are only three laws of nature, and one exception. ==
== 1) F=ma; 2) E=m(c squared); 3) You can't push a rope ==
== From these three laws all others can be derived. ==
== Except those explained by CHAOS THEORY. ==
==========================================================================