Search for SQL terms in comments

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

DECLARE @UserId int = ##UserId?90527##

SELECT 
    Comments.Id as [Comment Link],
    Comments.CreationDate
FROM 
    Comments join Posts on Comments.PostId = Posts.Id
    join PostTags on PostTags.PostId = Posts.Id
    join Tags on Tags.Id = PostTags.TagId 
     AND Tags.TagName IN ('sql', 'mysql')
        /*left join Posts as Q on Posts.ParentId = Q.Id*/
WHERE 
    UserId = @UserId
    AND Comments.CreationDate > '2021-01-01'
    AND Comments.Text LIKE '%join%'
    AND Comments.Text NOT LIKE 'Does this answer your question%'
    AND Comments.Text NOT LIKE 'Since SQL includes data definition%'
    AND Comments.Text NOT LIKE '… See the %'
    AND Comments.Text NOT LIKE 'See the %'
    AND Comments.Text NOT LIKE 'Please consult the %'
    AND Comments.Text NOT LIKE 'See also: "%'
    AND Comments.Text NOT LIKE '% should not be used for textual data%'
    AND Comments.Text NOT LIKE '%unless you''re writing a DB administration program; select only the columns you need.'
ORDER BY 
    Comments.CreationDate DESC

Enter Parameters

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