Base64 to Blob
764649Apr 5 2010 — edited Jan 10 2011Hi guys,
I am not an oracle expert. I am trying to insert a base64 data into a Blob. I was trying to use :
INSERT INTO MyDB.EXCELFILETABLE(FILELID,SPREADSHEETDATA,OWNER) values
( 1, utl_encode.base64_decode(utl_raw.cast_to_raw(b64Doc)),'owners' )
b64Doc is a base64 type string. I get the whole file as a base64 type.
I am getting this error that long can only be insert as Long. I get that RAW is actually a LONG. I don't understand that the method actually takes RAW so why it doesnt work.
I have searched on the net and ppl propose using a procedure. Can it not be done within a single sql.
I will really appreciate any help here.
thanks
mahdi