Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BLOB to LONG RAW conversion ?!?

Status
Not open for further replies.

saustin

MIS
Feb 19, 2001
336
US
Hi All,
Have a 3rd party legacy app on 8.i which we want to replicate that is just full (38 tables have them) of long raws. Have set up an easy conversion to BLOB (which replicate) using TO_LOB but have had problems converting them back to raw (TO_RAW is erroring out).
Does anyone know of a way that will be put in a trigger that converts a BLOB to a LONG RAW ?

Many thanks for any suggestions.

Steve Austin
MIS Department
Helicopter Support Inc
(203) 7953372 xt 106
 
SOLUTION: Just substitute your BLOB field name with the word BITS in the line below.
UTL_RAW.CAST_TO_RAW( UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(BITS,32000,1)))

Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top