0
SELECT 
COALESCE (chars.CFWEMAIL,
          chars.CLMEMAIL,
          chars.HLDEMAIL,
          chars.IFREMAIL)                   
                   email
FROM tmp

I am trying to achieve the above without hardcoding the columns into the coalesce statement.

Can I use LIKE % instead?

Coalesce all columns LIKE '%MAIL'
Heisenberg
  • 267
  • 3
  • 6
  • 15

0 Answers0