× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Pete,

Concatenate the columns for the like?

Select * from table
where field1 || field2 || field3 || field 4 like '%smith%'

Haven't tried it, but seems like it would work, as it would search all the columns that you cat together. Of course, it won't tell you *which* column it was in...but it will give you the whole record.

Just a thought!
message: 7
date: Tue, 9 Mar 2010 19:28:46 -0500
from: Pete Wood<acedanger49@xxxxxxxxx>
subject: RE: Full-text searching

I'm trying to basically do a wildcard search over several fields in a
database table. For example, if a user types in "Smith", I would run a query
over every text field in the table for the word(s) like "smith" and show the
most relevant at the top of the result set followed by the least relevant at
the bottom.

I'd rather not use "select * from table where txtFld1 like '%smith%' or
txtFld2 like '%smith%' ..." since that would be very slow for a large table.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.