How to convert text to hyperlinks using SQL queries with SQL for Confluence

This article explains how to convert text to hyperlinks using SQL queries in the SQL for Confluence app.

Instructions

  1. Insert an SQL macro on a Confluence page and edit the macro.
  2. Select the relevant SQL profile in the SQL macro editor. For this example, the following details are taken from the database and the link is added to the Name column
  3. Use the following SQL query to convert the names (in this example, Zack, Ram, and Krish) as hyperlinks wherein the link contains all the values of the respective column values:

    select '<a href="http://www.bobswift.com/SEQ_' || name || '/SEQ_' || age || '.htm">' || name || '</a>'  AS "Hire"from emp_info_SR

The first column shows the hyperlinks as required. In this example, pointing to a name in the Name column shows the relevant link as follows:

  • Ensure that the SQL macro is set with the required parameters. 
  • Ensure to update the query to match with other databases as required. 


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.