Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle UTL_RAW Package      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: UTL_RAW

Definition:
In Oracle, UTL_RAW is a package which provides subprograms for manipulation of RAW data. It was released in Oracle 7.3.4 and It is created as the part of a standard Oracle installation. Its script can be found at [ORACLE_HOME]/rdbms/admin/utlraw.sql.

The UTL_RAW subprograms are compiled in the below list as per Oracle documentation.

1. BIT_AND - Performs bitwise logical AND of the values in raw r1 with raw r2 and returns the raw result after AND operation.

Example Syntax: UTL_RAW.BIT_AND(input1, input2);

2. BIT_COMPLEMENT - Performs bitwise logical "complement" of the values in raw r and returns the "complemented" result raw.

Example Syntax: UTL_RAW.BIT_COMPLEMENT (input1, input2);

3. BIT_OR - Performs bitwise logical OR of the values in raw r1 with raw r2 and returns the raw result after OR operation.

Example Syntax: UTL_RAW.BIT_OR(input1, input2);

4. BIT_XOR - Performs bitwise logical "exclusive or" (XOR) of the values in raw r1 with raw r2 and returns the raw result after XOR operation.

Example Syntax: UTL_RAW.BIT_XOR(input1, input2);

5. CAST_TO_RAW - Converts a VARCHAR2 string represented using N data bytes into a raw with N data bytes.

Example Syntax: UTL_RAW.CAST_TO_RAW (input1, input2);

6. CAST_TO_VARCHAR2 - Converts raw represented using N data bytes into a VARCHAR2 string with N data bytes.

Example Syntax: UTL_RAW.CAST_TO_VARCHAR2 (input1, input2);

7. COMPARE - Compares raw r1 against raw r2. Returns 0 if r1 and r2 are identical; otherwise, returns the position of the first byte from r1 that does not match r2.

Example Syntax: UTL_RAW.COMPARE (input1, input2[, pad]);

8. CONCAT - Concatenates a set of up to 12 raws into a single raw.

Example Syntax: UTL_RAW.CONCAT (input1, input2, ..., input n);

9. CONVERT - Converts a raw from one character set to another character set.

Example Syntax: UTL_RAW.CONVERT(input, new_charset, old_charset);

10. COPIES - Returns N copies of the original raw concatenated together.

Example Syntax: UTL_RAW.COPIES (input);

11. LENGTH - Returns the length in bytes of a raw.

Example Syntax: UTL_RAW.LENGTH (input);

12. OVERLAY - Overlays the specified portion of a raw with a different raw value.

Example Syntax: UTL_RAW.OVERLAY(new_bytes, input, position, length, pad);

13. REVERSE - Reverses the byte sequence in the raw from end to end.

Example Syntax: UTL_RAW.REVERSE(input);

14. SUBSTR - Returns the specified sub-portion of a raw.

Example Syntax: UTL_RAW.SUBSTR (input, position[,length]);

15. TRANSLATE - Translates original bytes in the raw with the specified replacement set.

Example Syntax: UTL_RAW.TRANSLATE(input, match, replace_bytes);

16. TRANSLITERATE - Translates original bytes in the raw with the specified replacement set following rules, which result in the transliterated raw always being the same length as the original raw.

Example Syntax: UTL_RAW.TRANSLITERATE (input, replace_bytes, match, pad);

17. XRANGE - Returns a raw containing all valid 1-byte encodings in succession beginning with the value start_byte and ending with the value end_byte.

Example Syntax: UTL_RAW.XRANGE(start_byte, end_byte);


Related Links:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 44 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?