Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query referencing Handy Status macro

Denver Thomas
Contributor
October 18, 2023

I have a column in a table filled with Handy Statuses that are "Rev_0", "Rev_1", "Rev_2", "Rev_3".


I'm trying to use the Table Transform macro to filter this table down to certain Rev's, like so:

SELECT * FROM T* WHERE 'Rev_#' = "Rev_0";
(Table Transform's SQL Query section says to reference columns using single quotes.)

 

This is everything I've tried so far:

SELECT * FROM T* WHERE 'Rev_#' = "Rev_0";

SELECT * FROM T* WHERE 'Rev_#' = 'Rev_0';

SELECT * FROM T* WHERE 'Rev_#' = Rev_0;

 

SELECT * FROM T* WHERE 'Rev_#' = "REV_0";

SELECT * FROM T* WHERE 'Rev_#' = 'REV_0';

SELECT * FROM T* WHERE 'Rev_#' = REV_0;

 

SELECT * FROM T* WHERE 'Rev_#' = 0;

 

. . . And much, much more, frankly.


Thank you for any and all assistance!

2 answers

1 accepted

5 votes
Answer accepted
Denver Thomas
Contributor
October 18, 2023

SELECT * FROM T* WHERE ('Rev_#' = "REV_0")

This finally did the trick.

Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2023

Hi @Denver Thomas ,

Indeed the issue was in the extra ; at the end of the query, you were faster than us. :)

Like # people like this
2 votes
Anastasia Bek _Stiltsoft_
Atlassian Partner
October 20, 2023

Hello @Denver Thomas ,

Thank you for mentioning our Handy Macros for Confluence app!

Just to let you know, you’re always welcome to reach out anytime, as our support team is here to help. If you have any concerns or ideas about the app functionality, you can contact our support, and we gladly assist you and propose solutions where applicable.

Have a lovely Friday!

Best,

Anastasia

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events