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 @Tag1 VARCHAR(30) = ##KeywordOne:string##;
SET     @Tag1              = '%' + LTRIM(RTRIM(@Tag1)) + '%';
DECLARE @Tag2 VARCHAR(30) = ##KeywordTwo:string##;
SET     @Tag2              = '%' + LTRIM(RTRIM(@Tag2)) + '%';

SELECT     Id AS [Post Link], Score, Tags
FROM       Posts
WHERE      PostTypeId = 1
AND        ((Tags LIKE @Tag1 AND Tags LIKE @Tag2) 
OR         (Title LIKE @Tag1 AND Title LIKE @Tag2))


Enter Parameters

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