Subject | Re: Error in stored procedure. Why? (more) |
---|---|
Author | Paco Ruiz |
Post date | 2004-07-08T22:41:05Z |
> > This line raises an errorresults can
> >> DS = (1 - D1/100) * (1 - D2/100) * (1 - D3/100) * (1 - D4/100) > >
> > This two lines works fine
> > DS = (1 - D1/100) * (1 - D2/100) * (1 - D3/100) ;
> > DS = DS * (1 - D4/100) ;
>
> The 'precision' adds up as you go along. Your Numerics (18,6) when
> multiplied will become (18,12) and then (18,18) and then booom!
> Rewrite the expression into smaller parts so the intermediate
> be kept 'within reason'.I have tried
>
DS = (1 - D1/100) ;
DS = DS * (1 - D2/100) ;
DS = DS * (1 - D3/100) ;
DS = DS * (1 - D4/100) ;
But but sometimes i get again the error.
What can i do ?