> All I need to do is determine
> if a particular string ('.com') pattern exists in the
> column, within the first 75 bytes, and return its
> starting position.
The secret is the built-in DBMS_LOB.INSTR.
Haven't actually run this code, but something along these lines ought to
work:
DECLARE
lobloc BLOB;
rawstr RAW := UTL_RAW.CAST_TO_RAW('.com'); /* notice, case sensitive!
*/
pos PLS_INTEGER;
BEGIN
SELECT lobcol INTO lobloc WHERE primary_key = 'whatever';
pos := DBMS_LOB.INSTR(lobloc, rawstr);
IF pos > 0 and pos <= 75
THEN
DBMS_OUTPUT.PUT_LINE('found it!');
END IF;
END;
/
______________________________________________
http://www.datacraft.com/ http://plnet.org/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Bill Pribyl
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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
also send the HELP command for other information (like subscribing).