I am trying to search for multiple values across multiple columns so I can create an inclusion criteria flag, but can't figure out the best way. I need to create a flag, so I am trying to not have to use a where statement
I have this in my code now for only one value and it works:
when 'a' in (col1, col2, col3, col4)
then 1
else 0
end as col_a
Would like to do something like, but can't figure it out:
when 'a', 'b', 'c' in (col1, col2, col3, col4)
then 1
else 0
end as col_all
Any help is appreciated! Thanks!
