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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: blob

RE: blob

From: Jeffery Stevenson <jeff_at_mpv.com>
Date: Fri, 5 Jan 2001 08:49:18 -0600
Message-Id: <10732.125829@fatcity.com>


Haven't tested it yet myself, but one option could be to rewrite that WHERE clause as:

where DBMS_LOB.INSTR(swText, 'VAPP') > 0

(this looks for the string 'VAPP' in the BLOB and returns its location...if there is not pattern match, it returns a 0)

or if you specifically only want a match where the blob starts with 'VAPP', you could try the following to see if it works (the cast_to_varchar2 function wouldn't be necessary if you were using a CLOB instead of a BLOB):

where UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(swText,4,1)) = 'VAPP'

Anyways, I hope these help some (or at least give you some ideas of your own).

Jeffery Stevenson
Chief Databeast Tamer
Medical Present Value, Inc.
Austin, TX

-----Original Message-----
From: Sajid Iqbal [mailto:siqbal_at_vianetworks.co.uk] Sent: Friday, January 05, 2001 5:16 AM
To: Multiple recipients of list ORACLE-L Subject: blob

How do read from a BLOB?

sw_basic_script.swText is a blob

      SELECT swname
      FROM SW_BASIC_SCRIPT
      WHERE swText like 'VAPP%'

I've tried to_char, substr.  

Any Ideas

--

Sajid Iqbal
Database Administrator

VIA NET.WORKS
620 Birchwood Boulevard
Birchwood
Warrington
WA3 7QZ
DDI: +44 (0) 1925 484485 Fax: +44 (0) 1925 484466 Email: siqbal_at_vianetworks.co.uk
Website: http://www.vianetworks.co.uk

local touch global reach

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Sajid Iqbal
  INET: siqbal_at_vianetworks.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may Received on Fri Jan 05 2001 - 08:49:18 CST

Original text of this message

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