Skip to main content

%OID (SQL)

A scalar function that returns OID of an ID field.

Synopsis

%OID(id_field)

Description

%OID takes a field name and returns the fully formed OID (object ID) for the object. The field must be either an ID field or a reference field (a foreign key field). Specifying any other type of field in id_field generates an SQLCODE -1 error.

Arguments

id_field

The field name of an ID field, or a reference field.

Examples

The following example shows %OID used with a reference field:

SELECT Name, Spouse, %OID(Spouse)
FROM Sample.Person
WHERE Spouse IS NOT NULL

See Also

Purpose of this instance: Draft documentation
DocReleaseID: IRIS2025.1
Content loaded from:
/staging/learning/iris-doc/2025.1.x/doc/cache/en-us/src/
/staging/learning/iris-doc/2025.1.x/doc/ensemble/en-us/src/
/staging/learning/iris-doc/2025.1.x/doc/security/en-us/src/
/staging/learning/iris-doc/2025.1.x/doc/iris/en-us/src/
Excluded items: EAST, EDICOM, EHL72, EHL7T, HXHCINST, HXHCRN, HXIHINST, HXIHRN, PAGE_healthcare
FeedbackOpens in a new tab