Questions tagged with [tag] and [do not] contain [search term] in body

0

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

declare @tag nvarchar(35) = ##tag:string##;
declare @text nvarchar(max) = ##text:string##;
declare @include bit = iif(##include:string?yes## = 'yes', 1, 0);

select
  rank() over(order by CreationDate desc),
  Id as [Post Link],
  Tags,
  Score
from
  Posts
where
  PostTypeId = 1
  and
  Tags like '%<' + @tag + '>%'
  and
  (
    @include = 1 and charindex(@text, Body) > 0
    or
    @include = 0 and charindex(@text, Body) = 0
  )
  and
  Score >= 0
  and
  ClosedDate is null
order by
  CreationDate
desc

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results