-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
  • 821
  • 3
  • 16
  • 37

1 Answers1

2

You could use DECODE:

DECODE(IS_BOOK, 'Y', 'BOOK', 'SHOW')
Alex K.
  • 171,639
  • 30
  • 264
  • 288