SELECT [id] ,[spannedtext] ,[PMID_DOI] ,title ,class FROM [dbo].[Knowtator] WHERE 1 = 1 OR( [spannedtext] like AT2G37630% ) OR( [spannedtext] like ATSUC2% )
The Problem is in the logic of the query I need the first WHERE clause in this case to be an AND and any subsequent keywords to be OR.
Like so:
SELECT [id] ,[spannedtext] ,[PMID_DOI] ,title ,class FROM [dbo].[Knowtator] WHERE 1 = 1 AND ( [spannedtext] like AT2G37630% ) OR( [spannedtext] like ATSUC2% )
My Code:
SELECT [id] ,[spannedtext] ,[PMID_DOI] ,title ,class FROM [dbo].[Knowtator] WHERE 1 = 1 <cfloop list="AT2G37630 ATSUC2" delimiters=" " index="word" > OR( [spannedtext] like #word#% ) </cfloop>
Any help on how to do this would be highly appreciated.
Ross