aspose file tools
The moose likes Object Relational Mapping and the fly likes How to use the keyword for searching? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "How to use the keyword for searching?" Watch "How to use the keyword for searching?" New topic
Author

How to use the keyword for searching?

Max Bean
Ranch Hand

Joined: Mar 09, 2006
Posts: 31
If I want to construct the SQL statement to find from every fields in the table in which they contain that keyword or not, how can I do it?

If I do select * from table where ...... like %keyword%,
can I create stupid query like this one ---->
select * form table where column1 like %keyword% or column2 like %keyword% ..... or column100000000 like %keyword%...... or not?

The good condition is I don't have the full-text search feature with my DB. T_T
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 508

I don't know if there is a specific query to do the same. I have a couple of alternative notions.

If it is an existing table schema you can work with, Check if you have an audit table maintained for capturing the information about every field in a single field of the audit table.
If yes, try searching on those records and get the information. [Also check if maintains only the update audit. If yes, you might lose the information about inserts.]

If it is a new schema you are creating, try writing a trigger for the same.

Iam intersted in knowing the business case, working on which you had arrived at such a point.
[ August 05, 2007: Message edited by: Arun Kumarr ]

If you are not laughing at yourself, then you just didn't get the joke.
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 508

check FREETEXTTABLE
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to use the keyword for searching?
 
Similar Threads
newbie:select method problem
limiting the size of a resultset - Breaking up large resultset into chunks
DB2 - case sensitive or not
A SQL Problem: Help Please
JPA - need help with query