Dump your own posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Dump your own posts, e.g. for backup purposes.

Vegetarianism

Q&A for those committed to a vegan or vegetarian lifestyle and anyone interested in learning more

-- Dump your own posts
-- Dump your own posts, e.g. for backup purposes.

DECLARE @UserId int = ##UserId## ;


WITH transclosure(Id, OwnerUserId, ParentId, Title, Body) as 
( select a.Id, a.OwnerUserId, a.ParentId, a.Title, a.Body from Posts as a
   where OwnerUserId = @UserID 
  UNION ALL
SELECT b.Id, b.OwnerUserId, b.ParentId, b.Title, b.Body
FROM   Posts as b,
       transclosure as  c
WHERE  b.OwnerUserId = c.ParentId
)
select * from transclosure ;

Enter Parameters

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