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.

Ask Ubuntu

Q&A for Ubuntu users and developers

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

DECLARE @UserId int = ##UserId## ;


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

Enter Parameters

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