Rounding values in AS/400

5 pts.
Tags:
AS/400
AS/400 Query
How do l round up or round down values in a query/AS400?

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello Tonchin,
to my knowledge the ROUND function should work the same:

SELECT ROUND(MYFIELD,2) FROM MY TABLE

Bye

Don’t forget to visit my blog: If it has a plug, it’s IT stuff!!

=================================================================

Rounding (or truncation) is specified in Query/400 in the Specify processing options selection at the bottom of Define the Query. The choices for ‘Use rounding’ are Blank, Y=Yes, N=No.

By leaving the option blank, you tell Query/400 to make the choice during calculations although the choice is simply determined by running in the S/36 environment (becomes N) or OS/400 (becomes Y). Specifying either Y or N opens the risk of accumulated errors during complex calculations. You should understand how your choice will affect results before setting Y or N.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following