PL/SQL (MOSC)

MOSC Banner

PL/SQL: numeric or value error when using DBMS_UTILITY.IS_BIT_SET

edited Feb 3, 2011 8:33PM in PL/SQL (MOSC) 2 commentsAnswered ✓
set serveroutput on; declare      
rawValue raw(10);
begin      
rawValue := utl_raw.cast_to_raw('123');
dbms_output.put_line('raw:' || rawValue);      
dbms_output.put_line('final:' || DBMS_UTILITY.IS_BIT_SET(rawValue, 1));
end;
/
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.UTL_RAW", line 380
ORA-06512: at "SYS.DBMS_UTILITY", line 672
ORA-06512: at "SYS.DBMS_UTILITY", line 679
ORA-06512: at line 6

But below code works.

set serveroutput on;
declare      
rawValue raw(10);
begin      
rawValue := utl_raw.cast_to_raw('1234');
dbms_output.put_line('raw:' || rawValue);      
dbms_output.put_line('final:' || DBMS_UTILITY.IS_BIT_SET(rawValue, 1));

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center