Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Boolean search with AND operators

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-11-16 : 06:52:40
Laurence writes "How do you perform both a booelan search AND a conditional search in one go?

For example:

SELECT * FROM table WHERE catagoryA='$y'

is a correct search.

As is:

SELECT * FROM table WHERE MATCH (catagoryB) AGAINST ($x IN BOOLEAN MODE)

also works.

how do i combine the two?

i have tried ALL sorts such as:

SELECT * FROM table WHERE catagoryA='$y' AND MATCH (catagoryB) AGAINST ($x IN BOOLEAN MODE)

aswell as putting in the WHERE again

SELECT * FROM table WHERE catagoryA='$y' AND WHERE MATCH (catagoryB) AGAINST ($x IN BOOLEAN MODE)

aswell as lots of other things.

How can i search one field conditionally and another as a BOOLEAN term?

Thanks,

Laurence"
   

- Advertisement -