Re: Strange SQL Bug

From: Dave Mausner <dlm_at_dlogics.dlogics.com>
Date: Wed, 19 May 1993 13:38:58
Message-ID: <930519133858_at_dlpc030.dlogics.com>


In article <1993May19.062754.14533_at_ml.csiro.au> jstander_at_ml.csiro.au (Jeff Stander) writes:

> My colleagues have discovered the following bug in V6.
> .
>
> The SQL code is;
>
> set termout off
> set pause off
>
> column result format 99999.99
> column prefx format a17
>
> select '323168 / 323810 = ' prefx, 323168/323810 result from
> dual;
>
> select '333168 / 333810 = ' prefx, 333168/333810 result from
> dual;
>
> select '313168 / 313810 = ' prefx, 313168/313810 result from
> dual;
>
> exit
>
> The output is;
>
> PREFX RESULT
> ----------------- -----------------
> 323168 / 323810 = .00
> 333168 / 333810 = 1.00
> 313168 / 313810 = 1.00
>
> Bizarre, eh?

nah not at all.

>
> 1) Can anyone explain this?

sure, it is rounding because your number format specifies only two digits in the fraction. try removing the column format for the result.

> 2) Does this bug exist in V7? (Ours is not yet installed so I can't test it
> yet).

this output exists in v7, but my point is that it is not a bug.

--
Dave Mausner / Sr Consultant / Datalogics division of Frame Technology Inc
441 W Huron / Chicago IL 60610 / +1-312-266-4450 / "Just show me the code" 
Received on Wed May 19 1993 - 13:38:58 CEST

Original text of this message