Post containing some of the given texts (only ids)

1

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Different

Q&A for power users of Apple hardware and software

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]
  FROM Posts WHERE ',@list,N' ORDER BY Id DESC')

print @sql

exec(@sql)

Enter Parameters

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