Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

LONG RAW TO BLOB in ORACLE 11g2

Aymen Ben HeniaSep 12 2017 — edited Sep 13 2017

hi to all,

I have this description of my table :

Nom  NULL Type   

-------- -------- ------------

NOPIECE  NOT NULL NUMBER(8)   

MODULE   NOT NULL VARCHAR2(2) 

SMODULE       VARCHAR2(2) 

ORIGINE  NOT NULL VARCHAR2(30)

DCRE NOT NULL VARCHAR2(8) 
DMAJ NOT NULL VARCHAR2(8) 
PIECEOLE      LONG RAW
PIECEWEB      BLOB

i have a record that contain store a word document in pieceole column, i created a new entry in this table like that :

insert into piece (nopiece,module,smodule,origine,dcre,dmaj,pieceole,pieceweb)
select 99990,module,smodule,origine,dcre,dmaj,null,to_lob(pieceole) from piece where nopiece=1422;

I tried after that to write the blob to a file to open it, and it display to me binary code or special characters as content ,how can I change my insertion or what I missed for this conversion? thank you for your replies

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2017
Added on Sep 12 2017
12 comments
1,164 views