Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

OCI Datatype Mapping and Manipulation Functions, 64 of 134


OCIIntervalToText()

Purpose

Given an interval, produces a string representing the interval.

Syntax

sword OCIIntervalToText ( dvoid              *hndl,
                          OCIError           *err,
                          CONST OCIInterval  *interval,
                          ub1                lfprec,
                          ub1                fsprec,
                          OraText            *buffer, 
                          size_t             buflen,
                          size_t             *resultlen );

Parameters

hndl (IN)

The OCI user session handle or the environment handle.

err (IN/OUT)

The OCI error handle. If there is an error, it is recorded in err and this function returns OCI_ERROR. Obtain diagnostic information by calling OCIErrorGet().

interval (IN)

Interval to be converted.

lfprec (IN)

Leading field precision. (The number of digits used to represent the leading field.)

fsprec (IN)

Fractional second precision of the interval (the number of digits used to represent the fractional seconds).

buffer (OUT)

Buffer to hold the result.

buflen (IN)

The length of buffer.

resultlen (OUT)

The length of the result placed into buffer.

Comments

The interval literal is output as 'year' or '[year-]month' for INTERVAL YEAR TO MONTH intervals and as 'seconds' or 'minutes[:seconds]' or 'hours[:minutes[:seconds]]' or 'days[ hours[:minutes[:seconds]]]' for INTERVAL DAY TO SECOND intervals (where optional fields are surrounded by brackets).

Returns

OCI_SUCCESS,

OCI_INVALID_HANDLE, if err is a null pointer,

OCI_ERROR, if the buffer is not large enough to hold the result.

Related Functions

OCIIntervalFromText()

OCI Number Functions

This section describes the OCI Number functions.

Table 18-4 Number Functions
Function/Page Purpose

OCINumberAbs()

Computes the absolute value

OCINumberAdd()

Adds numbers

OCINumberArcCos()

Computes the arc cosine

OCINumberArcSin()

Computes the arc sine

OCINumberArcTan()

Computes the arc tangent

OCINumberArcTan2()

Computes the arc tangent of two numbers

OCINumberAssign()

Assigns one number to another

OCINumberCeil()

Computes the ceiling of number

OCINumberCmp()

Compares numbers

OCINumberCos()

Computes the cosine

OCINumberDec()

Decrements an OCI number

OCINumberDiv()

Divides two numbers

OCINumberExp()

Raises e to the specified Oracle number power

OCINumberFloor()

Computes the floor of a number

OCINumberFromInt()

Converts an integer to an Oracle number

OCINumberFromReal()

Convert a real to an Oracle number

OCINumberFromText()

Convert a string to an Oracle number

OCINumberHypCos()

Computes the hyperbolic cosine

OCINumberHypSin()

Computes the hyperbolic sine

OCINumberHypTan()

Computes the hyperbolic tangent

OCINumberInc()

Increments an Oracle number

OCINumberIntPower()

Raises a given base to an integer power

OCINumberIsInt()

Tests if a number is an integer

OCINumberIsZero()

Tests if a number is zero

OCINumberLn()

Computes the natural logarithm

OCINumberLog()

Computes the logarithm to an arbitrary base

OCINumberMod()

Modulo division

OCINumberMul()

Multiplies numbers

OCINumberNeg()

Negates a number

OCINumberPower()

Exponentiation to base e

OCINumberPrec()

Rounds a number to a specified number of decimal places

OCINumberRound()

Rounds an Oracle number to a specified decimal place

OCINumberSetPi()

Initializes a number to Pi

OCINumberSetZero()

Initializes a number to zero

OCINumberShift()

Multiplies by 10, shifting specified number of decimal places

OCINumberSign()

Obtains the sign of an Oracle number

OCINumberSin()

Computes the sine

OCINumberSqrt()

Computes the square root of a number

OCINumberSub()

Subtracts numbers

OCINumberTan()

Computes the tangent

OCINumberToInt()

Converts an Oracle number to an integer

OCINumberToReal()

Converts an Oracle number to a real

OCINumberToText()

Converts an Oracle number to a string

OCINumberTrunc()

Truncates an Oracle number at a specified decimal place


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback