compare clob and varchar2
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: compare clob and varchar2

  1. #1
    Join Date
    Jun 2003
    Posts
    47

    compare clob and varchar2

    hi,

    I have to make a query which has in the where clause a condition which is that a certain string is included in the clob field.
    Is there any function which does this or no?

    select *
    from t1
    where t1.clobfield like '%string_var%';

    thanks

  2. #2
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    dbms_lob?
    Tomaž
    "A common mistake that people make when trying to design something completely
    foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams

  3. #3
    Join Date
    Jun 2003
    Posts
    47
    well I know there is dbms_lob.compare but its for two lobs and haven't found one whitch tests if a varchar2 is part of the lob or not? I you know it,that would be very helpfull.

    thanks

  4. #4
    Join Date
    Jul 2003
    Posts
    59
    The function DBMS_LOB.INSTR can be used to see if a string occurs in a LOB.

    See this:

    http://download-east.oracle.com/docs...b2.htm#1008998

    Also, you could use Oracle Text, or (Intermedia in 8i) and index the tokens of the clob.

Posting Permissions

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


Click Here to Expand Forum to Full Width