Search my comments

1

Please login or register to vote for this query.

(click on this box to dismiss)

Find posts with comment from given user that matches LIKE pattern.

Stack Overflow

Q&A for programmers

SELECT TOP 100
       row_number() OVER (ORDER BY c.CreationDate DESC) AS [Nr]
     , p.Id AS [Post Link], c.CreationDate, c.Text, c.Score
     , 'site://questions/' + CAST(p.Id AS nvarchar) + '#' + CAST(p.AcceptedAnswerId AS nvarchar) AS [Accepted Answer]
FROM   Comments AS c
JOIN   Posts As p ON p.Id = c.PostId
WHERE  c.Text LIKE '%' + ##SearchQuery:string?o you have%answer## + '%'
AND    c.UserId = ##UserId:int?939860##  -- My SO userID as default -- dba:3684
ORDER  BY c.CreationDate DESC;

Enter Parameters

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