Results 1 to 2 of 2

Thread: SELECT from lob

  1. #1
    Join Date
    Jun 2003
    Location
    Vienna, Austria
    Posts
    2

    Unanswered: 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?

  2. #2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •