SO to dba.se migrations

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
  ph.*, 
  so_id
from
  Posts p
  inner join PostHistory ph on ph.PostId = p.Id
  CROSS APPLY (VALUES (SUBSTRING(ph.Comment, CHARINDEX('/questions/', ph.Comment) + LEN('/questions/'), 8000))) CA(id_first)
  CROSS APPLY (VALUES (LEFT(id_first,CHARINDEX('/',id_first) -1))) CA2(so_id)
where
  ph.PostHistoryTypeId = 36 -- Post Migrated Here
  and ph.Comment like '%://stackoverflow.com%'

Enter Parameters

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