Q&A about the site for gardeners and landscapers
-- Flagston sock is here: https://chemistry.stackexchange.com/users/36917/flagston -- No nefarious activities intended! Favorites seem pretty innocuous.... -- IncludeFlagged: Include posts favorited by Flagston (Y/N)? -- IncludeCactus: Include posts containing NIH CACTUS links (Y/N)? DECLARE @IncludeFlagged nvarchar = ##IncludeFlagged:string?N## DECLARE @IncludeCactus nvarchar = ##IncludeCactus:string?N## DECLARE @FlagstonID int = 36917 SET @IncludeFlagged = UPPER(@IncludeFlagged) SET @IncludeCactus = UPPER(@IncludeCactus) SELECT p.Id AS [Post Link], p.Score, p.CreationDate FROM Posts p LEFT JOIN Votes v ON (p.Id = v.PostId OR p.ParentId = v.PostId) AND v.VoteTypeId = 5 AND v.UserId = @FlagstonID WHERE CHARINDEX('i.stack.imgur.com', LOWER(p.Body)) > 0 AND (v.Id IS NULL OR @IncludeFlagged = 'Y') AND (CHARINDEX('cactus.nci.nih.gov', LOWER(p.Body)) = 0 OR @IncludeCactus = 'Y') ORDER BY p.CreationDate ASC