I currently have a dataset where different combinations of 3 columns would either result in a new column called “Overall Value” as PASS or FAIL.
For the 3 columns, I first need to standardize the different values in them to a PASS or FAIL. For example, if the column contained “good” or “passing score”, the value should be pass. if it was “bad” or “unacceptable” or NULL than the value should be fail. This same logic would then apply to the other 2 columns.
From there, for each row, if any of the 3 columns has a has a value of PASS the the “Overall Value” is PASS, otherwise if all are “FAIL” then the “Overall Value” is FAIL
I created 3 separate case statements in my select statement to “Standardize” the values as PASS or FAIL and put the overall query into a view (eg. view1)
I then created another view(eg. view2) to compare the 3 values to produce the value in the “Overall Value”
My logic worked and I am getting the expected output, but I would like to do this all in a single view instead of creating one view to feed into another. How can I do this?
Patrick Teng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.