-1

Creating a view, I'm trying to find an equivalent 'if-else' function similar to NVL2(). The values I have coming in are guaranteed to be non-null.

theFunction(IS_BOOK == 'Y', 'BOOK', 'SHOW')
Ace
  • 791
  • 3
  • 14
  • 37

1 Answers1

2

You could use DECODE:

DECODE(IS_BOOK, 'Y', 'BOOK', 'SHOW')
Alex K.
  • 165,803
  • 30
  • 257
  • 277