Tuesday, April 22, 2014

ORA-06502: PL/SQL: numeric or value error: raw variable length too long

If you are using utl_raw.cast_to_raw(input_string) in a SQL, it will fail where
 input_string length  > 2000

--This will fail
select utl_raw.cast_to_raw(lpad('demo',2001,'z')) raw_str
from dual;

ORA-06502: PL/SQL: numeric or value error: raw variable length too long
ORA-06512: at "SYS.UTL_RAW", line 224

--This will work
select utl_raw.cast_to_raw(lpad('demo',2000,'z')) raw_str
from dual;


You have to write a pl/sql and handle the raw conversion outside the SQL, as shown below.

Create table t2( col1 blob);

Declare
bBlob blob;
begin
    bBlob := utl_raw.cast_to_raw(lpad('aaaa',4000,'z')) ;
    Insert into t2 values (bBlob);
 commit;
end;
/

Tuesday, April 15, 2014

IE 11: Compatibility vew settings

The broken page icon on the right end of the address bar is no longer available in IE 11.

In IE10 and previous versions, you had this icon where you can click it to run in the compatibility view.



In IE 11, This icon is no longer available on the address bar. You need to click on Settings icon or Tools Menu and select "Compatibility View Settings", and add




your domain (it should be added by default), if you were on that page before. Check the box as shown below.



No more error messages like these..