String search in Title/Tags/Body with a minimum score of 7 and without code in body


Please login or register to vote for this query.

(click on this box to dismiss)

Search for a string that occurs either in title, tags or body Posts need a minimum score of 7 and should be without code in body

Amateur Radio

Q&A for amateur radio enthusiasts

-- Top Score Open Questions Title Or Tags Matching Keywords
-- Search for all open questions with both keywords in either the title or tags sorted by top score

DECLARE @QTagOne VARCHAR(255) = ##KeywordOne:string##;
SET     @QTagOne              = '%' + LTRIM(RTRIM(@QTagOne)) + '%';
DECLARE @QTagTwo VARCHAR(255) = ##KeywordTwo:string##;
SET     @QTagTwo              = '%' + LTRIM(RTRIM(@QTagTwo)) + '%';

SELECT     Id AS [Post Link], Score, Tags, ID
FROM       Posts a
WHERE      PostTypeId = 1
AND        ((Tags LIKE @QTagOne AND Tags LIKE @QTagTwo) 
OR         (Title LIKE @QTagOne AND Title LIKE @QTagTwo))
AND        (a.Body) not like '%<blockquote%'

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results