Search comment by keyword AND Q/A author


Please login or register to vote for this query.

(click on this box to dismiss)

Philosophy Meta

Q&A about the site for those interested in the study of the fundamental nature of knowledge, reality, and existence

DECLARE @keyword AS NVARCHAR(60) = ##keyword:string? ##;
DECLARE @pauthor AS INT = ##PostAuthor:int?-1##

  p.Id AS [Post Link],
  'site://q/' + Convert(VarChar(10), p.Id) + '#comment' +  Convert(VarChar(10), p.Id) + '_' + Convert(VarChar(10), c.Id) + '|' + c.Text AS [Comment],
  c.Score AS [Score],
  p.CreationDate AS [Post date],
  c.CreationDate AS [Comment date]
FROM Posts p
INNER JOIN Comments c
ON c.PostId = p.Id
  p.OwnerUserId = @pauthor
  AND c.Text LIKE N'%' + @keyword + '%' COLLATE Latin1_General_100_CI_AI_SC_UTF8
ORDER BY c.CreationDate

Enter Parameters

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