informix
INFORMIX-ESQL/C Programmer's Manual
ESQL/C Function Library

invdivinv()

The invdivinv() function divides an interval value by another interval value.

Syntax

Usage

The invdivinv() function divides the interval value in i1 by i2, and stores the result in num. The result can be either positive or negative.

Both the input and output qualifiers must belong to the same interval class: either the year to month class or the day to fraction(5) class. If necessary, the invdivinv() function extends the interval value in i2 to match the qualifier for i1 before the division.

Return Codes

0 The division was successful.
<0 The division failed.
-1200 A numeric value is too large (in magnitude).
-1201 A numeric value is too small (in magnitude).
-1266 An interval value is incompatible with the operation.
-1268 A parameter contains an invalid interval qualifier.

Example

The demo directory contains this sample program in the file invdivinv.ec.

Output


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved