This article explains how to use the functions in MySQL using the app SQL for Confluence (Pro Edition).
Instructions
Follow the steps:
Login to the Confluence instance.
Go to the required confluence page and edit the same.
- Add SQL macro and go to the Edit option to open the settings for SQL settings.
Select the Data source profile and write the SQL statement as shown in the below image.
a. CONCAT () - This function allows you to add two or more strings together.Code Block language sql selectSELECT user_name, active, case when active = 'T' then CONCAT('{status:color=red|title=', active, '}') when active = 'F' then CONCAT('{status:color=yellow|title=' display_name," ", active," '}') else CONCAT('{status:color=red|title=', active, '}') end as "Status" from ",created_date) AS Userdetails FROM cwd_user;
b. LEFT JOIN ()Code Block language sql SELECT * FROM cwd_user LEFT JOIN cwd_group on cwd_user.directory_id = cwd_group.directory_id
Info |
---|