17 lines
402 B
Plaintext
17 lines
402 B
Plaintext
-- simple construct
|
|
select
|
|
when logicalCondition1 then condition1()
|
|
when logicalCondition2 then condition2()
|
|
otherwise conditionDefault()
|
|
end
|
|
|
|
-- set up a catch block to intercept missing OTHERWISE clause
|
|
do
|
|
select
|
|
when logicalCondition1 then condition1()
|
|
when logicalCondition2 then condition2()
|
|
end
|
|
catch ex1 = NoOtherwiseException
|
|
ex1.printStackTrace()
|
|
end
|