How to change the output Value in a Select statement based on certain Criteria
CLM v6.0.4 iFix007 Here is my DB2 SQL for my JRS Report Builder Report against a RQM Project. as part of my report I am listing all the status for each Test Script within my Test Plan. If a script has not been run then it shows a Blank (Unassigned) value for Verdict. Instead of Blank I want it to Say "No Run". So in the SQL Query or the Custom expression I am trying to change the value for the Verdict (T4.VERDICT in the code below) if it is Unassigned to say "No Run" otherwise display what the value for that row. I am getting an error so I know i am doing it wrong but cannot figure it out, if someone can assist with a solution it would be greatly appreciated...Thank you
SELECT DISTINCT T1.PROJECT_NAME,
|
Accepted answer
Try this:
Richard Kissel selected this answer as the correct answer
Comments
Richard Kissel
commented Mar 07 '18, 12:09 p.m.
Thank You Donald, Your solution did not encounter an error during validation so I was very hopeful, but It did not change the value in the report. I also tried using: WHEN (T4.VERDICT = '') THEN 'No Run' WHEN (T4.VERDICT = ' ') THEN 'No Run' WHEN (T4.VERDICT = NULL) THEN 'No Run' So not sure how to get it changed... Perhaps the below may help in how I am trying to get the data
Trace Relationship:
Because the Test Scripts do not hold a value that it has been executed or the last execution I am using Test Case Result as an Option to the Test Script so that it will give me all the Results plus if a Test case has not been run then it will show blank fields. Of course I do not wan to show blank fields I want it to say "No Run".
Richard Kissel
commented Mar 07 '18, 2:16 p.m.
It worked with double Quotes WHEN (T4.VERDICT = "") THEN 'No Run' |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.