This article explains how to use SQL for Confluence with Run Self Service Reports to display dynamic content on a page.
Instructions
- Insert a Run with a user form and parameters macro in a Confluence page and provide field values for the form by editing the Run macro as shown below screenshots:
Insert another macro: SQL macro inside the Run macro in a Confluence page and write a SELECT statement in the SQL macro settings as shown below:
Select CREATOR,CREATIONDATE from SPACES WHERE SPACEID='$Space Id' AND SPACEKEY='$Space Key';
For dynamic value substitution, you need to use $ with the field name in the SQL macro
- Provide the values for the fields as shown below:
- Click Run to display the results.
This example is from the SQL Server database.