Comments containing some of the given keywords

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

declare @links nvarchar(max) = ##links:string##
declare @list nvarchar(max)
declare @sql nvarchar(max)

select @list = string_agg(concat('(Text LIKE ''%', value,'%'')'), ' OR ')
from string_split(@links, ',')

set @sql = concat(N'SELECT TOP 100 Id AS [Comment Link], text, UserId AS [User Link], CreationDate
  FROM Comments
  WHERE ',@list,N' ORDER BY CreationDate DESC')

print @sql

exec(@sql)

Enter Parameters

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