case expression results  case

Chapter 14: Using Batches and Control-of-Flow Language

case expression requires at least one non-null result

At least one result from the case expression must return a value other than null. The following query:

select price, 
    case
        when title_id like "%" then NULL
        when pub_id like "%" then NULL
    end
from titles

returns the error message:

All result expressions in a CASE expression must not be NULL




Copyright © 2005. Sybase Inc. All rights reserved. case

View this book as PDF