Boolean Search 
Author Message
 Boolean Search

Hello,

I am trying to create a search engine allowing the user to enter a Boolean
search to search a column,
which I will then parse out to pass as a SQL statement to a MS SQL Server. I
seem to be having
an extremely tough time doing it, specifically writing the code to parse out
a Boolean search.
If anyone has any tips, or sample code they can send me, I would greatly
appreciate it.

Thanks
Michael F.



Fri, 23 May 2003 15:09:01 GMT  
 Boolean Search
I'm not sure what you are really looking for.  First, what type of database.
Are you searching for string(s) in 1 specific column of a table?

For example, are you having a user enter "ABBA AND MUSIC" and you want to
generate SQL that looks like (using SQL Server syntax):

SELECT Text FROM MyTable
WHERE Text LIKE '%ABBA%'
AND Text LIKE '%MUSIC%'

OR statements typically would need to be surrounded by parenthesis since
OR's override AND's (in SQL Server).

So:
    1 OR 2 AND NULL = TRUE
    (1 OR 2) AND NULL = FALSE

Post more info if this doesn't help.


Quote:
> Hello,

> I am trying to create a search engine allowing the user to enter a Boolean
> search to search a column,
> which I will then parse out to pass as a SQL statement to a MS SQL Server.
I
> seem to be having
> an extremely tough time doing it, specifically writing the code to parse
out
> a Boolean search.
> If anyone has any tips, or sample code they can send me, I would greatly
> appreciate it.

> Thanks
> Michael F.



Fri, 23 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Boolean Search in Power Basic 3.1

2. Boolean search in a text with a parser

3. Boolean search in a text with a parser

4. doing a boolean search on a database

5. Boolean Search

6. boolean search

7. ADO Boolean search criteria

8. newbie ;) How to do a boolean search on a database?

9. Search / Match hundreds of boolean fields

10. Can you perform a boolean AND search using the regular find in Outlook 2000?

11. vba boolean field format?

12. Boolean feild in Make Table Query?

 

 
Powered by phpBB® Forum Software