My Edit History

0

Please login or register to vote for this query.

(click on this box to dismiss)

Software Quality Assurance and Testing Meta

Q&A about the site for software quality control experts, automation engineers, and software testers

-- My edit history
-- Shows edits to posts I did not originally create

SELECT 
  CASE 
    WHEN (P.PostTypeId = 1) THEN P.Title 
    ELSE (SELECT TOP 1 Title FROM Posts WHERE Posts.Id = P.ParentId)
  END AS [Question Title], 
  CASE 
    WHEN (P.PostTypeId = 1) THEN 'Question' 
    ELSE 'Answer' 
  END AS [Edit To], 
  PHT.Name,
  PH.CreationDate AS [Edit Date],
  'site://questions/' + CONVERT(VARCHAR, P.Id)+'|Post #' + CONVERT(VARCHAR, P.Id) AS [Link]
FROM PostHistory AS PH, Posts AS P, PostHistoryTypes AS PHT
WHERE 
  (P.Id = PH.PostId AND PH.PostHistoryTypeId = PHT.Id) -- joins
  AND PH.UserId = ##UserId## AND P.OwnerUserId <> ##UserId##
ORDER BY PH.CreationDate ASC

Enter Parameters

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