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 -> Including/parsing out text from within document in query..

Including/parsing out text from within document in query..

From: <noel.whelan_at_gmail.com>
Date: 13 Jan 2006 16:38:28 -0800
Message-ID: <1137199107.951472.149600@g47g2000cwa.googlegroups.com>


I would like to know if there is a way to include text from inside a document in the data yielded by an Oracle Text CONTAINS query. I've got a table with the fields: id, item (in which 'item' is a blob including word docs and pdf files), in which case I could execute this query:

	select id from items
	where contains(item, '%content%', 1) > 0;

I want to then, in this case, collect the e-mail address(es) in each document yielded by the query to provide back to the client. I'd imagine I could write an expression to filter these out, illustrated not very well perhaps in this [pseudo]query:

	select id, (item ~ '^.+@.+\\..+$') into email from items
	where contains(item, '%content%', 1) > 0;

In this case, 'email' would include each instance of text within the doc which conformed to the expression in the query. I'm not certain if this is even close to what I'd need to do; but is there a way to do this?

Currently installed: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta

Thank you. Received on Fri Jan 13 2006 - 18:38:28 CST

Original text of this message

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