Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

searching multiple values - query

Gor_MahiaJul 8 2014 — edited Jul 9 2014

Hi,

I have a table with columns tablexxx (first name, last name, location, department, description etc) also description can be long text(CLOB TYPE) now my report query i want to enter a combination of these values in any order to search and return correct rows like below,

2 sample rows below:

FIRST NAME, LAST NAME, LOCATOION,   DEPT,        DESCRIPTION

==========================================================

Scott,Tiger,Dallas,SALES,"Is currently the departmental lead since 2009"

Mercy     Baker,     Newark,     HR,    "Was hired in January 2010 as asst. Manager"

select  xxxxx from tablexxx

WHERE CONTAINS (first||last||locations||depatment||description, :search_text)   > 0;

  also tried INSTR()


the problem is somebody can enter values in different order like ==>   'Dallas Graig Sales January 2010 '  or ' January 2010 Graig Dallas Sales'

so what is the best approach to search the rows here? also can somebody give a hint on text search usage

in Oracle 11g2

thanks all.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2014
Added on Jul 8 2014
6 comments
3,204 views