× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



At 05:39 01/04/1999 -0800, Prakash Subramanian wrote:
>are difficult via Query/400.  When I tried to do a round off(Of course, 
>I have alienated the RPG III programs as I found they are really 
>cumbersome) from interactive SQL, I found to my amazement there is no 
>real Round Off Function Available. Though I found FLOOR function. I also 

If a numeric calculation truncates and you need it to round, you can do
something like this:

DECIMAL(AA*BB+.0005,9,3)

This will round to the nearest 1/1000

The trick is to always add 1/2 of the desired calculation accuracy. 1.3 +
.5 will truncate to 1. 1.8 + .5 will truncate to 2, giving the same result
as rounding to the nearest integer.

Pete Hall
peteh@inwave.com
http://www.inwave.com/~peteh
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.