Skip to end of banner
Go to start of banner

How to update table values and display using Run macro with SQL Macro

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 27 Current »

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

Instructions

  1. 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:


  2. Insert SQL macro in a Confluence page and write an update query in SQL macro 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 write a select query as shown below to get the output of the above update query:

    Select pkTaskID, Status, Notes FROM BI_SUPP;
  4. Add the above two SQL macros inside the Run macro as shown in the below screenshot and save the Confluence page.
  5. Provide the values for the fields as shown below:
  6. Click Run to display the macro results.


This example is from the SQLServer database.

  • No labels