CREATE PROCEDURE [dbo].[spGetCommentPages]
AS
BEGIN
	select commentpage_id, commentpage_parent_page, commentpage_pageID
	from tblCommentPages
	join tblCommentEntries on commentpage_parent_page = commententry_posting_page
	group by commentpage_id, commentpage_parent_page, commentpage_pageID
	having count(*) > 0
END