You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I am using 'Table Transformer' macro to pull out JIRA issues and their status using a JQL.
Let's assume that my query returns 3 issues with following statuses:
Also, I am renaming the columns in my query for some reasons, something like:
SELECT T1.'Labels' as 'Project',
T1.'Count Closed' as 'Closed',
T1.'Count OPEN' as 'Open',
T1.'Count In Progress' as 'In Progress',
From T1 WHERE T1.'Labels' in (<my customer labels for JIRAs>);
And now let's assume that Defect 'C' was moved from 'In Progress' to 'Code Review'. But now the same query returns the error:
Column does not exist: Count In Progress
This is resulting in frequent page breaks. How can I add a condition in such a way that rename a column only if it exists?
Hi @Shantharam ,
You may use the COALESCE function for the case. In my example I'm sure that 'Text 1' and 'Text 3' columns are always present but 'Text 2' column may or may not be present:
SELECT
'Text 1' AS 'New 1',
'Text 3' AS 'New 3',
COALESCE('Text 2',"") AS 'New 2'
FROM T*
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.