Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Search problem

2 views
Skip to first unread message

Manish

unread,
Aug 25, 2008, 1:31:35 PM8/25/08
to
Hi
How do i search for text in attachments?
All the file attachments are stored in a blob in a table.

What sql will work to search for text in those attachments?
I tried using 'CONTAINS'..but it is ot working.

TIA

manish

Roland Smith [TeamSybase]

unread,
Aug 25, 2008, 4:32:11 PM8/25/08
to
This is not possible with standard SQL statements. The closest would be LIKE
'%mytest%' but the datatype would have to be a text type.

There might be an add-in for your database. What is your database?

"Manish" <m...@hotmail.com> wrote in message
news:10teknhlqpoev$.le46rdwf51jb.dlg@40tude.net...

Manish

unread,
Aug 25, 2008, 4:46:59 PM8/25/08
to

the DB is oracle 10g

Bruce Armstrong [TeamSybase]

unread,
Aug 25, 2008, 8:23:10 PM8/25/08
to
Oracle has a full text search query option.

"Manish" <m...@hotmail.com> wrote in message

news:1ao68qm7fnzgc$.1lfpfraxwgs0e.dlg@40tude.net...

Terry Dykstra

unread,
Aug 26, 2008, 1:23:17 PM8/26/08
to
That option depends on your version of Oracle. Standard Edition does not
have that.
You can use the DBMS_LOB.INSTR() function to search for text within a blob.

--
Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
product enhancement requests:
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Bruce Armstrong [TeamSybase]" <NOCANSPAM_br...@teamsybase.com>
wrote in message news:48b34cee$1@forums-1-dub...

Manish

unread,
Aug 27, 2008, 12:59:30 PM8/27/08
to
On 26 Aug 2008 10:23:17 -0700, Terry Dykstra wrote:

> That option depends on your version of Oracle. Standard Edition does not
> have that.
> You can use the DBMS_LOB.INSTR() function to search for text within a blob.

Thanks for the help.
How do i use it?Can you provide an example?

Roland Smith [TeamSybase]

unread,
Aug 27, 2008, 2:27:57 PM8/27/08
to
I did a Google search and found this:

http://www.psoug.org/reference/dbms_lob.html

"Manish" <m...@hotmail.com> wrote in message

news:1p9ias0h9jxq7.j...@40tude.net...

Roland Smith [TeamSybase]

unread,
Aug 27, 2008, 2:32:48 PM8/27/08
to
This should work

where dbms_lob.instr(clob_column, 'the string') > 0


0 new messages