Q&A about the site for people organizing, marketing or licensing open source development projects
DECLARE @PostText nvarchar(600) = ##PostText:string## DECLARE @UserId INT SELECT @PostText = UPPER(@PostText) SELECT @UserId = ##UserId## SELECT Posts.Id AS [Post Link], Posts.Score AS [Score], Posts.CreationDate AS [Creation Date] FROM Posts LEFT JOIN Votes ON Posts.ID = Votes.PostId WHERE (Posts.PostTypeId = 1 AND Votes.VoteTypeId = 5) AND Votes.UserId = @UserId AND ( UPPER(Posts.Body) LIKE '%' + @PostText + '%' OR UPPER(Posts.Title) LIKE '%' + @PostText + '%') ORDER BY Posts.CreationDate DESC