DECODE with Wild Card Characters ???
549147Nov 30 2006 — edited Nov 30 2006Hi,
My scenario is that I want to put 'Y' in my result set whereever the column value matches 'B25A' , 'B25B' , 'B25C' except 'B25D'.
I can use DECODE(columnValue, 'B25A' , 'Y' , 'B25B' , 'Y' , 'B25C' , 'Y' , 'N')
This works fine... but if there are 50 values like this ... I cant really go on writing the decode options, for each of them... Since all of them have a common characteristic that they contain '25', I was trying to use '%25%' within Decode...
But it doesnt work ! .... I think as expected, it considers '%' as a character and looks for that instead of a wildcard search...
Along with this, it should take care of the exception case - B25D.
Please suggest.
Thanks...