So do you have your answer on SO


Please login or register to vote for this query.

(click on this box to dismiss)

Database Administrators

Q&A for database professionals who wish to improve their database skills and learn from others in the community

       row_number() OVER (ORDER BY c.CreationDate DESC) AS [Nr]
     , p.Id AS [Post Link]
     , c.Text
     , c.CreationDate AS c_date
     , c.Score AS 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
ORDER  BY c.CreationDate DESC;

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results