Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

ROWIDTOCHAR (extension)

Syntax

ROWIDTOCHAR ( expression )

Description

The scalar function ROWIDTOCHAR returns the character form of a ROWID contained in the input argument.

Example

The following example uses ROWIDTOCHAR to convert a row identifier from its internal representation to a character string.

SELECT cust_no,

SUBSTR (ROWIDTOCHAR (ROWID), 1, 8) 'PAGE NUMBER',

SUBSTR (ROWIDTOCHAR (ROWID), 10, 4) 'LINE NUMBER',

SUBSTR (ROWIDTOCHAR (ROWID), 15, 4) 'TABLE SPACE NUMBER'

FROM customer ;

Notes

  • The argument to the function must be a ROWID.
  • The result is of type NCHAR for Unicode builds and CHAR for ANSI builds.
  • If the argument expression evaluates to null, the result is null.

TOCIndex