Search for String in Title/Tags/Body with minimum score 4 and no code in body


Please login or register to vote for this query.

(click on this box to dismiss)

Latin Language

Q&A for linguists, teachers, and students wanting to discuss the finer points of the Latin language

-- Search for String in Title, Tags and Body with minimum score 4 and no code in body --
-- without code examples --

DECLARE @Text1 VARCHAR(100) = ##Text:string##; 
SET     @Text1             = '% '+LTRIM(RTRIM(@Text1))+' %';

SELECT    Id AS [Post Link], Score, Tags, ViewCount, AnswerCount, CommentCount, FavoriteCount, OwnerUserId, Title 
FROM       Posts 
  (PostTypeId = 1) AND
     (Body NOT LIKE '%<pre%><code>%') AND -- for block code with name --
     (Body NOT LIKE '%<pre><code>%') AND -- just block code --
     (Body NOT LIKE '%<pre>%<code>%') AND -- for pre -> new line -> code --
     (Posts.Score >= 4) AND -- change min score -
     ((lower(Posts.Tags) LIKE lower(@Text1)) OR
     (lower(Posts.Title) LIKE lower(@Text1)) OR
     (lower(Posts.Body) LIKE lower(@Text1))) 


Enter Parameters

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