Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
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

UTL_RAW , 10 of 22


SUBSTR Function

This function returns len bytes, starting at pos from RAW r.

Syntax

UTL_RAW.SUBSTR (
   r   IN RAW,
   pos IN BINARY_INTEGER,
   len IN BINARY_INTEGER DEFAULT NULL) 
  RETURN RAW;

Pragmas

pragma restrict_references(substr, WNDS, RNDS, WNPS, RNPS); 

Parameters

If pos is positive, then SUBSTR counts from the beginning of r to find the first byte. If pos is negative, then SUBSTR counts backwards from the end of the r. The value pos cannot be 0.

If len is omitted, then SUBSTR returns all bytes to the end of r. The value len cannot be less than 1.

Table 80-9 SUBSTR Function Parameters
Parameter  Description 
r
 

The RAW byte-string from which a portion is extracted. 

pos
 

The byte position in r at which to begin extraction. 

len
 

The number of bytes from pos to extract from r (optional). 

Defaults and Optional Parameters

Table 80-10 SUBSTR Function Exceptions
Optional Parameter  Description 
len
 

Position pos through to the end of r

Returns

Table 80-11 SUBSTR Function Returns
Return  Description 
portion of r
 

Beginning at pos for len bytes long.  

NULL
 

R input parameter was NULL

Errors

Table 80-12 SUBSTR Function Errors
Error  Description 
VALUE_ERROR
 

Either pos = 0 or len < 0  


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, 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