I have a control which contains one of the following 3 values:
1. Q Research
2. T Research
3. B Research
I have a 2nd query which will use a value based on the above to search the Status from the Status history section. The Status of the above is "Complete" but the Status I'm looking for is "Q - Complete" or "T- Complete" or "B - Complete".
Task level status will contain "Complete"
Sub-task level status will be a little different based on the top 3 values.
Is there a way to change the Status value I'm searching for with an IF statement or CASE statement.
Task:
RQ_Type = T Research
Status = Complete
Sub-task:
RQ_Type = T Research
Status = T - Complete
I need to be able to search for all Sub-tasks where the Sub-task Status is based on the value of the RQ_Type.
Hi Brant! Thanks for your question and sharing your SQL code. You could certainly use a CASE statement to modify your subtask issue's status, however I'd recommend adding the CASE statement into the SELECT statement instead of having it in the WHERE clause. Also, you'll need to follow the Spark SQL syntax formatting for CASE statements which is
CASE WHEN x THEN y ELSE z END
If you're going to be querying this subtask status often, you may want to look into adding this as a custom column or custom table in your schema.
Here is a copy of my SQL:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.