Review entities of a post

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow en español

Preguntas y respuestas para programadores y profesionales de la informática

DECLARE @ReviewTaskUrl TABLE (
  ReviewTaskTypeId INT,
  Url VARCHAR(MAX)
);

INSERT INTO @ReviewTaskUrl
SELECT 1 AS ReviewTaskTypeId, 'suggested-edits' AS Url
UNION
SELECT 2, 'close'
UNION
SELECT 3, 'low-quality-posts'
UNION
SELECT 4, 'first-posts'
UNION
SELECT 5, 'late-answers'
UNION
SELECT 6, 'reopen';

--SELECT * FROM @ReviewTaskUrl;

SELECT
  'site://review/' + ReviewTaskUrl.Url + '/' +
    CAST(ReviewTasks.Id AS VARCHAR(MAX)) + '|Review' AS Url,
  ReviewTaskUrl.Url,
  ReviewTasks.*
FROM ReviewTasks, @ReviewTaskUrl ReviewTaskUrl
WHERE
  ReviewTasks.PostId=##PostId:int##
  AND
  ReviewTasks.ReviewTaskTypeId = ReviewTaskUrl.ReviewTaskTypeId
ORDER BY Id

Enter Parameters

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