Chapter 4: SQL Language Elements
4.9.2.69 ROWIDTOCHAR (extension)
Syntax
ROWIDTOCHAR ( expression )
Description
The scalar function ROWIDTOCHAR returns the character form of a ROWID contained in the input argument. The representation of a row identifier depends on the storage manager. The format of the argument to this function is defined by the storage manager. See the documentation for your storage manager for details.
Example
The following example uses ROWIDTOCHAR to convert a row identifier from its internal representation to a character string. This example is specific to the Dharma storage manager's representation of a row identifier:
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, as defined by the storage manager.
- The result is of CHARACTER type.
- If the argument expression evaluates to null, the result is null.