I have written a large complex stored procedure which produces a dataset of 39 items or so per record. These items come from joins to various tables and sub queries but I have written it so the vast majority outputs are Y/N. If there is a 'Y' in 1 or more of 25 of the fields I want to assign a level, let's call it Red. If there is a Y in any of the fields per record I want to assign a different level to the record, let's call it yellow. If no Y's are found then assign Green
I could have a huge Where statement where I search in the form 'ColA = Y OR ColB = Y OR ColC...' but this seems pretty inefficient and labour intensive.
Therefore: Can anyone think of a way to search for a simple consistent string in any field on a record so i can assign that record to a level if it's found?
Best I have found is the link below but I was hoping in the the 3 1/2yrs since the last post on this topic there may have been some progress, or at least some new people with new ideas?
I'd really appreciate any thoughts you may have on this problem,