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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Probably a real easy question...

Author  Topic 

matt_calhoon
Posting Yak Master

235 Posts

Posted - 2001-04-19 : 22:00:11
Howdy guys - got a SQL question for you....

take the following SELECT statement:

Select * From mytable WHERE title like '%keyword%' OR CONTAINS (Content, '"keyword"') AND fldViewableOnWeb = 1

Im looking at selecting from this table where a keyword either matched the title column or content column and ONLY where fldViewableOnWeb = 1

BUT - because I am using the OR does this mean that it matches either the condition before the OR or the condition after the OR? Because if it matches the condition before the OR then does this neglect the AND fldViewableOnWeb = 1?

Comments appreciated.

- matt


   

- Advertisement -