How to update database columns and display them in a page using Run macro with SQL macro

This article explains how to update values in a database table for a column and display them in a Confluence page using Run Self-Service Reports for Confluence and SQL for Confluence apps.


  1. Insert a Run with a user form and parameters macro in a Confluence page and provide field values to the form by editing the Run macro as shown below screenshots:

  2. Insert SQL macro and enter an update query in the SQL macro body as shown in the below example:

    UPDATE BI_SUPP SET [Status] = @status,'notes' = 'notes' + @notes FROM BI_SUPP WHERE PkTaskId = @pttaskid
  3. Insert another SQL macro and enter a select query as shown below to get the output of the update query from previous step:

    Select pkTaskID, Status, Notes FROM BI_SUPP;
  4. Add two SQL macros from the step 3 and 4 into the Run macro body as shown in the below screenshot and save the Confluence page.
  5. Provide the field values as shown below:
  6. Click Run to display the macro results.

This example is from the SQLServer database.

Find answers from the community.

Ask a question to the community.

Log a request with our support team.

Confluence®, Jira®, Atlassian Bamboo®, Bitbucket®, Fisheye®, and Atlassian Crucible® are registered trademarks of Atlassian®
Copyright © 2005 - 2022 Appfire | All rights reserved. Appfire™, the 'Apps for makers™' slogan and Bob Swift Atlassian Apps™ are all trademarks of Appfire Technologies, LLC.