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*
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.