ph check

0

Please login or register to vote for this query.

(click on this box to dismiss)

The Workplace Meta

Q&A about the site for members of the workforce navigating the professional setting

declare @question int = 1;
declare @reTag int = 3;
declare @tagToSearch nvarchar(35) = ##tag:string?google-apps-script-web-application##;


select
cast(PH.CreationDate as date),
Posts.Tags,
Posts.Id as [Post Link],
PH.UserDisplayName,
PH.Text
from
(Posts
inner join PostHistory as PH on PH.PostId = Posts.Id)

where
Posts.PostTypeId = @question
and
-- PH.PostHistoryTypeId = @reTag
-- and
(
  charindex('<' + @tagToSearch + '>', PH.Text) <= 0
  and
  Posts.Tags like ('%<' + @tagToSearch + '>%' )
)
group by
Posts.Tags,Posts.Id,PH.PostId,PH.Text, cast(PH.CreationDate as date),PH.UserDisplayName
order by
cast(PH.CreationDate as date) desc

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results