Search comments by user ID

1

Please login or register to vote for this query.

(click on this box to dismiss)

Open Data

Q&A for developers and researchers interested in open data

-- UserId: User ID
-- SearchString: Search string

SELECT TOP 500
  PostId AS [Post Link],
  CreationDate,
  Id AS [Comment Link]
FROM
  comments
WHERE
  UserId = '##UserId:int##'
  AND LOWER(text) LIKE '%' + LOWER(##SearchString:string##) + '%'
ORDER BY LEN(text) ASC

Enter Parameters

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