MOD: Calculating the Remainder From a Division

How to:

MOD calculates the remainder from a division. The output data type is the same as the input data type.

Syntax: How to Calculate the Remainder From a Division

MOD(dividend, divisor)

where:

dividend

Numeric

Is the value to divide.

Note: The sign of the returned value will be the same as the sign of the dividend.

divisor

Numeric

Is the value to divide by.

If the divisor is zero (0), the dividend is returned.

Example: Calculating the Remainder From a Division

MOD returns the remainder of PRICE_DOLLARS divided by DAYSDELAYED

MOD(PRICE_DOLLARS, DAYSDELAYED)

For 399.00/3, the value is zero (0).

for 489.00/3, the value is .99.

WebFOCUS

Feedback