Posts containing some of the given texts

1

Please login or register to vote for this query.

(click on this box to dismiss)

Moderators

Q&A for community managers, administrators, and moderators

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

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

set @sql = concat(N'SELECT TOP 100 Id As [Post Link], CreationDate, Body
  FROM Posts WHERE ',@list,N' ORDER BY CreationDate DESC')

print @sql

exec(@sql)

Enter Parameters

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