If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > SELECT from lob

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-25-03, 17:31
pleyfrei pleyfrei is offline
Registered User
 
Join Date: Jun 2003
Location: Vienna, Austria
Posts: 2
SELECT from lob

Warning: I'm a bit of a newbie in Oracle, so please give a 10 second head start before you get out your flame thrower ;-))
I'm not the administrator of the DB I'm dealing with, just a volunteer trying to help a NGO with their website

I have a problem with a SELECT in Oracle:
I want to select records with text that contans a certain searchstring.
The following query just returns an errormessage:
SELECT header, id FROM section WHERE text like '%Afghanistan%'

Errormessage: ORA-00932: inconsistent datatypes

So I tried
SELECT header FROM section WHERE dbms_lob.INSTR(text, 'Afghanistan')>0
But this query always returns only 1 record.

Apparently the text is not stored as text, but as some form of lob.

How can I reliably select ALL records, that contain given string?
Reply With Quote
  #2 (permalink)  
Old 07-09-03, 20:00
aruneeshsalhotr aruneeshsalhotr is offline
Registered User
 
Join Date: Jul 2003
Location: US
Posts: 314
LOB type

If the LOB is of the type CLOB, this should return you all the rows.
Try the same using yasql (available on the net) and run the command back again.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On