Results 1 to 5 of 5

Thread: wildcard search

  1. #1
    Join Date
    May 2008
    Posts
    13

    Unanswered: wildcard search

    Hi,

    I have written a query as follows to handle wildcard search in a procedure:
    create or repalce procedure proc1
    (
    srch_str varchar2,
    results SYS_REFCURSOR
    )
    is
    Begin

    OPEN cv_results FOR
    'SELECT *
    FROM PA_PACKAGE_MSTR APM
    WHERE APM.PKG_CODE LIKE '''||'%'||srch_str||'%'||'''' ;

    End;

    A second way of implementin the same was:
    SELECT *
    FROM PA_PACKAGE_MSTR APM
    WHERE INSTR(APM.PKG_CODE,srch_str) !=0;




    I wanted to know if there is any other way of implementing the same, specifically by not converting the sql query to string???

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I'm not sure whether it will be interesting for you, but - take a look at Oracle Text.
    Quote Originally Posted by Oracle
    Oracle Text is a tool that enables you to build text query applications and document classification applications. Oracle Text provides indexing, word and theme searching, and viewing capabilities for text.

  3. #3
    Join Date
    May 2008
    Posts
    13
    Littlefoot,

    I use Oracle 10g, this link seems to direct to oracle 11 features

  4. #4
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I use Oracle 10g
    You do? How could we know that?

    Anyway, Oracle Text exists in 10g as well - you'd see a link to it if you had read a little bit more than just the very first line at the provided page, right in the "Technical Overviews by Version" section. Or, search for it by yourself (that's even better option).

  5. #5
    Join Date
    May 2008
    Posts
    13
    thanks Littlefoot

Posting Permissions

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