select p.id , p.body into #posts from users u inner join ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select p.id
     , p.body
into #posts
from users u
inner join posts p on
  p.owneruserid = u.id
where accountid = ##accountid##


select distinct p.id as [Post Link]
from #posts p
cross apply string_split('----,|--,--+--,--|--',',') line
where body like concat('%<code>%', line.value, '%</code>%')

Enter Parameters

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