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, 15 of 134


OCIIterPrev()

Purpose

Gets a pointer to the previous iterator collection element.

Syntax

sword OCIIterPrev ( OCIEnv            *env, 
                    OCIError          *err, 
                    OCIIter           *itr, 
                    dvoid             **elem, 
                    dvoid             **elemind,
                    boolean           *boc );

Parameters

env (IN/OUT)

The OCI environment handle initialized in object mode.

See Also:

OCIEnvCreate() and OCIInitialize()

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().

itr (IN/OUT)

Iterator which is updated to point to the previous element.

elem (OUT)

Address of the previous element; returned after the iterator is updated to point to it.

elemind (OUT) [optional]

Address of the element's null indicator; if (elemind == NULL) then the null indicator will not be returned.

boc (OUT)

TRUE if iterator is at beginning of collection (that is, previous element does not exist); otherwise, FALSE.

Comments

This function returns a pointer to the previous iterator collection element and its corresponding null information. The iterator is updated to point to the previous element.

If the iterator is pointing to the first element of the collection prior to executing this function, then calling this function will set boc to TRUE. The iterator is left unchanged in that case.

This function returns an error if any input parameter is null.

Related Functions

OCIErrorGet(), OCIIterGetCurrent(), OCIIterNext()

OCI Date, Datetime, and Interval Functions

This section describes the OCI Date and Interval functions.

Table 18-3 Date Functions  
Function/Page Purpose

OCIDateAddDays()

Adds or subtracts days

OCIDateAddMonths()

Adds or subtracts months

OCIDateAssign()

Assigns date

OCIDateCheck()

Checks if the given date is valid

OCIDateCompare()

Compares dates

OCIDateDaysBetween()

Gets number of days between two dates

OCIDateFromText()

Converts string to date

OCIDateGetDate()

Gets the date portion of a date

OCIDateGetTime()

Gets the time portion of a date

OCIDateLastDay()

Gets date of last day of month

OCIDateNextDay()

Gets date of next day

OCIDateSetDate()

Sets the date portion of a date

OCIDateSetTime()

Sets the time portion of a date

OCIDateSysDate()

Gets current system date and time

OCIDateToText()

Converts date to string

OCIDateTimeAssign()

Performs datetime assignment

OCIDateTimeCheck()

Checks if the given date is valid

OCIDateTimeCompare()

Compares two datetime values

OCIDateTimeConstruct()

Constructs a datetime descriptor

OCIDateTimeConvert()

Converts one datetime type to another

OCIDateTimeFromArray()

Converts an array of size OCI_DT_ARRAYLEN to an OCIDateTime descriptor

OCIDateTimeFromText()

Converts the given string to Oracle datetime type in the OCIDateTime descriptor, according to the specified format

OCIDateTimeGetDate()

Gets the date (year, month, day) portion of a datetime value

OCIDateTimeGetTime()

Gets the time (hour, min, second, fractional second) out of a datetime value

OCIDateTimeGetTimeZoneName()

Gets the time zone name portion of a datetime value

OCIDateTimeGetTimeZoneOffset()

Gets the time zone (hour, minute) portion of a datetime value

OCIDateTimeIntervalAdd()

Adds an interval to a datetime to produce a resulting datetime

OCIDateTimeIntervalSub()

Subtracts an interval from a datetime and stores the result in a datetime

OCIDateTimeSubtract()

Takes two datetimes as input and stores their difference in an interval

OCIDateTimeSysTimeStamp()

Gets the system current date and time as a timestamp with time zone

OCIDateTimeToArray()

Converts a OCIDateTime descriptor to an array

OCIDateTimeToText()

Converts the given date to a string according to the specified format

OCIDateZoneToZone()

Converts date from one time zone to another zone

OCIIntervalAdd()

Adds two intervals to produce a resulting interval

OCIIntervalAssign()

Copies one interval to another

OCIIntervalCheck()

Checks the validity of an interval

OCIIntervalCompare()

Compares two intervals

OCIIntervalDivide()

Divides an interval by an Oracle Number to produce an interval

OCIIntervalFromNumber()

Converts an Oracle Number to an interval

OCIIntervalFromText()

Given an interval string, returns the interval represented by the string

OCIIntervalFromTZ()

Returns an OCI_DTYPE_INTERVAL_DS.

OCIIntervalGetDaySecond()

Gets values of day, hour, minute, and second from an interval

OCIIntervalGetYearMonth()

Gets year and month from an interval

OCIIntervalMultiply()

Multiplies an interval by an Oracle Number to produce an interval

OCIIntervalSetDaySecond()

Sets day, hour, minute, and second in an interval

OCIIntervalSetYearMonth()

Sets year and month in an interval

OCIIntervalSubtract()

Subtracts two intervals and stores the result in an interval

OCIIntervalToNumber()

Converts an interval to an Oracle Number

OCIIntervalToText()

Given an interval, produces a string representing the interval

90

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