Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Reading the first bytes from a BLOB and convert to String

Re: Reading the first bytes from a BLOB and convert to String

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 10 Aug 2006 09:59:45 -0700
Message-ID: <1155229185.757133.47520@i3g2000cwc.googlegroups.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US