Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Reading the first bytes from a BLOB and convert to String
eriben wrote:
> Aloha,
>
> I am trying to create a PL/SQL procedure to recognize non-supported
> filetypes that is stored as a BLOB in my database; more accurately it
> is a ORDSys.ORDImage.
>
> I want to do this by reading the first 1000 bytes of the file and then
> do an INSTR after the occurence of a pattern, such as 'JFIF' or in my
> case 'DICM' and 'MATRIX7'.
>
> Does anyone have a best-practice for this kind of operation?
>
> Kindly,
> Erik Bengtsson
What version of Oracle?
The dbms_log package provides instr and substr functions that are usable on a blob.
HTH -- Mark D Powell -- Received on Thu Aug 10 2006 - 11:59:45 CDT
![]() |
![]() |