find all reviews for a post

1

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 r.postid as [Post Link]
, 'site://review/' + 
  case 
  when r.reviewtasktypeid = 1 then 'suggested-edits'
  when r.reviewtasktypeid = 2 then 'close'
  when r.reviewtasktypeid = 4 then 'first-posts'
  when r.reviewtasktypeid = 6 then 'reopen'
  else lower(replace(rt.name,' ','-'))
  end + '/' +
  cast(r.id as nvarchar) +
  '|' + rt.name as [review]
-- , r.reviewtasktypeid -- for debugging
from reviewtasks r
inner join reviewtasktypes rt on rt.id = r.reviewtasktypeid
where r.postid = ##postid:int##

Enter Parameters

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