Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

Most databases support some flavor of the SQL case statement making it easy to condition what appears in a column. This will show how to combine this with Confluence capabilities like macros to improve how information is displayed.

Example Using Emoticons

This example uses emoticons to visually indicate some aspect of the data this is import to highlight to the viewers.

...

Code Block
languagesql
titleSQL
select 
     "Product",
     "Plan",     
     "Revenue",
     case 
         when "Revenue" >= "Plan" then '(/)'
         else '(x)'
     end as "Met Plan"
 from products



Example Using Macros

This example uses a Confluence macro to add visual indicators to the display.

...