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 next page

80
UTL_RAW

The UTL_RAW package provides SQL functions for manipulating RAW datatypes. This package is necessary because normal SQL functions do not operate on RAWs, and PL/SQL does not allow overloading between a RAW and a CHAR datatype. UTL_RAW also includes subprograms that convert various COBOL number formats to, and from, RAWs.

UTL_RAW is not specific to the database environment, and it may actually be used in other environments as it exists here. For this reason, the prefix UTL has been given to the package, instead of DBMS.

This chapter discusses the following topics:

Usage Notes

UTL_RAW allows a RAW "record" to be composed of many elements. By using the RAW datatype, character set conversion will not be performed, keeping the RAW in its original format when being transferred through remote procedure calls.

With the RAW functions, you can manipulate binary data that was previously limited to the hextoraw and rawtohex functions.

Summary of UTL_RAW Subprograms

Table 80-1 UTL_RAW Subprograms  
Subprogram  Description 

"CAST_FROM_BINARY_INTEGER Function" 

Returns the binary representation of a BINARY_INTEGER (in RAW). 

"CAST_FROM_NUMBER Function" 

Returns the binary representation of a NUMBER (in RAW). 

"CAST_TO_BINARY_INTEGER Function" 

Casts the binary representation of a BINARY_INTEGER (in RAW) into a BINARY_INTEGER  

"CAST_TO_NUMBER Function" 

Casts the binary representation of a NUMBER (in RAW) into a NUMBER. If include_length is TRUE, the first byte of r encodes the number of bytes in r ( 

"CAST_TO_RAW Function" 

Converts a VARCHAR2 represented using n data bytes into a RAW with n data bytes. 

"CAST_TO_VARCHAR2 Function" 

Converts a RAW represented using n data bytes into VARCHAR2 with n data bytes. 

"CONCAT Function" 

Concatenates up to 12 RAWs into a single RAW

"LENGTH Function" 

Returns the length in bytes of a RAW r

"SUBSTR Function" 

Returns len bytes, starting at pos from RAW r

"TRANSLATE Function" 

Translates the bytes in the input RAW r according to the bytes in the translation RAWs from_set and to_set

"TRANSLITERATE Function" 

Converts the bytes in the input RAW r according to the bytes in the transliteration RAWs from_set and to_set

"OVERLAY Function" 

Overlays the specified portion of target RAW with overlay RAW, starting from byte position pos of target and proceding for len bytes. 

"COPIES Function" 

Returns n copies of r concatenated together. 

"XRANGE Function" 

Returns a RAW containing all valid 1-byte encodings in succession, beginning with the value start_byte and ending with the value end_byte

"REVERSE Function" 

Reverses a byte sequence in RAW r from end to end. 

"COMPARE Function" 

Compares RAW r1 against RAW r2

"CONVERT Function" 

Converts RAW r from character set from_charset to character set to_charset and returns the resulting RAW

"BIT_AND Function" 

Performs bitwise logical "and" of the values in RAW r1 with RAW r2 and returns the "anded" result RAW

"BIT_OR Function" 

Performs bitwise logical "or" of the values in RAW r1 with RAW r2 and returns the "or'd" result RAW

"BIT_XOR Function" 

Performs bitwise logical "exclusive or" of the values in RAW r1 with RAW r2 and returns the "xor'd" result RAW

"BIT_COMPLEMENT Function" 

Performs bitwise logical "complement" of the values in RAW r and returns the "complement'ed" result RAW


Go to previous page 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