how to search a long column?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: how to search a long column?

  1. #1
    Join Date
    May 2001
    Posts
    55

    How do I search a long column for a text string in it?

    I obviously cannot use "LIKE" because sql gives an error

    ORA-00932: Inconsistent datatypes

    A farmer learns more from a bad harvest than a good one

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    right now I can think of writing a function which convert long to varchar2 then in your where clause use this function

  3. #3
    Join Date
    May 2001
    Posts
    55

    Surely, Oracle should have something to help us search for strings embedded in LONG columns?

    No?

    Otherwise what is the use of only storing data in LONG if you cannot search/retrieve anything in/from it?

    can anyone tell me if there are any functions I could use to work with long columns?


    A farmer learns more from a bad harvest than a good one

  4. #4
    Join Date
    Feb 2001
    Location
    Adelaide, Australia
    Posts
    159
    I think this question would be more appropriate in the developers forum.

    My answer would be 'DON'T USE LONGS!'

    They cause endless grief to us dbas!

  5. #5
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    Originally posted by topstar

    Surely, Oracle should have something to help us search for strings embedded in LONG columns?

    No?

    Otherwise what is the use of only storing data in LONG if you cannot search/retrieve anything in/from it?

    can anyone tell me if there are any functions I could use to work with long columns?


    In Oracle 8.1.7 and 9i you can index LONG columns with Oracle Text. It is a core feature of the DB.

    So, I suggest you use the new CONTEXT OPTION, first it has to be installed and configured in your server.





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