[Info-Ingres] ROUNDING numbers in sql procedure
Jürgen Cappel
email at juergen-cappel.de
Thu Aug 2 04:54:54 CDT 2007
Hi Martin,
be careful, you will get undesired results with negative numbers !
How about using the builtin function round() ?
Jürgen
-------- Original Message --------
Subject: Re: [Info-Ingres] ROUNDING numbers in sql procedure
Date: Thu, 02 Aug 2007 10:38:14 +0100
From: martin.bowes at ctsu.ox.ac.uk
To: npiet at gascognelaminates.com
CC: info-ingres at kettleriverconsulting.com
Hi Nathalie
Why not just add 0.5 to the result before the integer conversion occurs?
Marty
> I have procedures in an ingres database
> In these procedures, I do some numbers operations.
> when the result is for example 3644,6 the number is rounded to 3644
> and I would like that it's rounded to 3645. how can i do to round to
> the next number ? is there an function wich do this ? thanks
>
> Nathalie
>
> _______________________________________________
> Info-Ingres mailing list
> Info-Ingres at kettleriverconsulting.com
> http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres
>
_______________________________________________
Info-Ingres mailing list
Info-Ingres at kettleriverconsulting.com
http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.kettleriverconsulting.com/mailman/private/info-ingres/attachments/20070802/e193e77c/attachment-0001.html
More information about the Info-Ingres
mailing list