Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL query which can pull list of all pages form the confluence which was edited/updated or created

Sandeep Anand October 15, 2017

Actually i want to find a SQL query which can pull list of all the pages form the my production environment in confluence which was edited/updated or created between specific time frame. I have found a sql macro related that and implemented that. But it didn't show any results. 

So is there any other way so that i can find the list of all the pages which were updated between some specific time frame. 

 

please reply asap.

 Thanks  

2 answers

1 accepted

1 vote
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 16, 2017

Does this work for you?

declare
@begin datetime,
@end datetime

set @begin = '01/01/2017'
set @end = '10/16/2017'

select *
from [dbo].[CONTENT]
where PREVVER is NULL
and CONTENTTYPE = 'PAGE'
and CONTENT_STATUS = 'current'
and (
(
CREATIONDATE >= @begin
and CREATIONDATE <= @end
)
or (
LASTMODDATE >= @begin
and LASTMODDATE <= @end
)
)
Sandeep Anand October 17, 2017

Hi Davin,

Thanks for the answer. Appreciate it.

Yes this works for me as required.

But i am also searching for a macro so that the data can be displayed on the confluence page and all the users can view the data.

So if any help regarding the macro is suggested then it will be a great help. 

 

Thanks and regards

Sandeep Anand

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 17, 2017
0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 16, 2017

Hi Sandeep,

I'm not sure of the exact SQL that would provide that, but you would be able to get the same results from a few different add-ons, such as the Archiving Plugin or the Reporting plugin.

I would recommend having a look at those, test them out, and see which one best suits your needs.

Kind Regards,
Shannon

Sandeep Anand October 16, 2017

Hi Shannon,

Thanks for the suggestions. Appreciate that.

But in my case, the plug-ins will not be effective. As i want to list all the pages which were edited or created between certain period of time and also their details that who has created or modified those pages.

Thanks and regards

Sandeep Anand

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events