473,386 Members | 1,609 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Search a table column on any word or all words?

Does anybody have the code for, an example of, or a link to a
text-search function that supports exact phrase, any word, and all words
searching in an Access table. If so, could you please post it?

Robert

This is what I need:
I need to be able to search on a text field in a table. I want to give
the user the opportunity to search on

Exact phrase
Any word
All the words

from their entry in a field on a form. Exact phrase is easy (just use
LIKE '*' & user input & '*' in the query) but the other 2 require some type
of looping. Does anyone have a working example?

Nov 13 '05 #1
5 3588
Sounds an awful lot like the built-in Find function (binoculars button).

"Robert" <pr**********@yahoo.com> wrote in message
news:Gg******************@fe06.lga...
Does anybody have the code for, an example of, or a link to a
text-search function that supports exact phrase, any word, and all words
searching in an Access table. If so, could you please post it?

Robert

This is what I need:
I need to be able to search on a text field in a table. I want to give the user the opportunity to search on

Exact phrase
Any word
All the words

from their entry in a field on a form. Exact phrase is easy (just use LIKE '*' & user input & '*' in the query) but the other 2 require some type of looping. Does anyone have a working example?

Nov 13 '05 #2
I need to be able to enter

apples oranges pears

and find every occurrence of all of them and every occurrence of any of
them.

"MacDermott" <ma********@nospam.com> wrote in message
news:ZU****************@newsread2.news.atl.earthli nk.net...
Sounds an awful lot like the built-in Find function (binoculars button).

"Robert" <pr**********@yahoo.com> wrote in message
news:Gg******************@fe06.lga...
Does anybody have the code for, an example of, or a link to a
text-search function that supports exact phrase, any word, and all words
searching in an Access table. If so, could you please post it?

Robert

This is what I need:
I need to be able to search on a text field in a table. I want to

give
the user the opportunity to search on

Exact phrase
Any word
All the words

from their entry in a field on a form. Exact phrase is easy (just

use
LIKE '*' & user input & '*' in the query) but the other 2 require some

type
of looping. Does anyone have a working example?


Nov 13 '05 #3

"Robert" <pr**********@yahoo.com> wrote in message
news:Gg******************@fe06.lga...
Does anybody have the code for, an example of, or a link to a
text-search function that supports exact phrase, any word, and all words
searching in an Access table. If so, could you please post it?

Robert

This is what I need:
I need to be able to search on a text field in a table. I want to give the user the opportunity to search on

Exact phrase
Any word
All the words

from their entry in a field on a form. Exact phrase is easy (just use LIKE '*' & user input & '*' in the query) but the other 2 require some type of looping. Does anyone have a working example?

I don't know of any magical way to do it, but you could use:

exact phrase
LIKE '*' & user input & '*'

any word
LIKE '*' & user input & '*' OR
LIKE '*' & user input & '*' OR
LIKE '*' & user input & '*'

all words
LIKE '*' & user input & '*' AND
LIKE '*' & user input & '*' AND
LIKE '*' & user input & '*'

You would have to insert " marks and you'd have to parse the user input.
Nov 13 '05 #4
You'll make it much easier on yourself if your users can give you
alternative entries in a list, rather than strung together in a list. What
if someone enters
asian pear
Do you want to return all fields which contain "asian" and all fields which
return "pear", or only those which return "asian pear"? Can you see the
conceptual difference between this and entering
apple pear
?
"Robert" <pr**********@yahoo.com> wrote in message
news:in******************@fe06.lga...
I need to be able to enter

apples oranges pears

and find every occurrence of all of them and every occurrence of any of
them.

"MacDermott" <ma********@nospam.com> wrote in message
news:ZU****************@newsread2.news.atl.earthli nk.net...
Sounds an awful lot like the built-in Find function (binoculars button).

"Robert" <pr**********@yahoo.com> wrote in message
news:Gg******************@fe06.lga...
Does anybody have the code for, an example of, or a link to a
text-search function that supports exact phrase, any word, and all words searching in an Access table. If so, could you please post it?

Robert

This is what I need:
I need to be able to search on a text field in a table. I want to

give
the user the opportunity to search on

Exact phrase
Any word
All the words

from their entry in a field on a form. Exact phrase is easy (just

use
LIKE '*' & user input & '*' in the query) but the other 2 require some

type
of looping. Does anyone have a working example?



Nov 13 '05 #5
I'm aiming for all three depending on their selection. I want matches on
any word, matches on all words, and matches on the exact phrase.
"MacDermott" <ma********@nospam.com> wrote in message
news:4O*****************@newsread2.news.atl.earthl ink.net...
You'll make it much easier on yourself if your users can give you
alternative entries in a list, rather than strung together in a list.
What
if someone enters
asian pear
Do you want to return all fields which contain "asian" and all fields
which
return "pear", or only those which return "asian pear"? Can you see the
conceptual difference between this and entering
apple pear
?
"Robert" <pr**********@yahoo.com> wrote in message
news:in******************@fe06.lga...
I need to be able to enter

apples oranges pears

and find every occurrence of all of them and every occurrence of any of
them.

"MacDermott" <ma********@nospam.com> wrote in message
news:ZU****************@newsread2.news.atl.earthli nk.net...
> Sounds an awful lot like the built-in Find function (binoculars
> button).
>
> "Robert" <pr**********@yahoo.com> wrote in message
> news:Gg******************@fe06.lga...
>> Does anybody have the code for, an example of, or a link to a
>> text-search function that supports exact phrase, any word, and all words >> searching in an Access table. If so, could you please post it?
>>
>> Robert
>>
>> This is what I need:
>> I need to be able to search on a text field in a table. I want
>> to
> give
>> the user the opportunity to search on
>>
>> Exact phrase
>> Any word
>> All the words
>>
>> from their entry in a field on a form. Exact phrase is easy
>> (just
> use
>> LIKE '*' & user input & '*' in the query) but the other 2 require some
> type
>> of looping. Does anyone have a working example?
>>
>>
>>
>
>



Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil Powell | last post by:
The table already has a fulltext index and from there I can use the MySQL fulltext search query to get results as well as the relevancy score. The problem I have is that MySQL has a default...
83
by: D. Dante Lorenso | last post by:
Trying to use the 'search' in the docs section of PostgreSQL.org is extremely SLOW. Considering this is a website for a database and databases are supposed to be good for indexing content, I'd...
6
by: DC | last post by:
Hi, I am programming a search catalogue with 200000 items (and growing). I am currently using the SQL Server 2000 fulltext engine for this task but it does not fit the requirements anymore. ...
1
by: DDK | last post by:
I am looking to create a better search in C#, Asp.Net and Sql Server 2000. Is there any books or websites out there that talk about this. I don't need to search the entire site, just a column in...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
3
by: Russell | last post by:
Hey, ok i have numerous tables to search through for a 'site search'. some of the searchble fields have html embeded within so after some quick referencing, saw I can use the regExp function...
3
by: vonclausowitz | last post by:
Hi All, I was thinking of creating a table in my database to index all words in the database. That way I can quickly search for one or more words and the index table will return the words and...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
9
by: tomjones75 | last post by:
dear community, i want to search the content of all fields in one table in a access database. it already works for the content of one field in the table. please take a look at the code in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.