BLOB in DECODE function
782210Mar 25 2012 — edited Mar 26 2012Hi All,
I am new to sql. I want to use decode for BLOB datatype. For this i written a query like below.
Here user_data is of type BLOB.
select DECODE(length(user_data), 0, null, file_data) user_data from user_table;
I have tried the other way by using case like below. Its worked fine
select
CASE
WHEN LENGTH(user_data )=0
THEN NULL
ELSE user_data
END user_data from user_table;
What i made wrong in the first query?
Thanks
Jimmi