select case statements
select case statements
Script supports select case statements with following syntax:
SELECT CASE selectorExpression
CASE caseexpr1
statement1
CASE caseexprn
statementn
CASE ELSE
elsestatement
END SELECT
if selectorExpression matches the result of one of caseexprn expressions, the respective statements will be execute. Otherwise, elsestatement will be executed. Else part of case statement is optional.
Example:
SELECT CASE uppercase(Fruit)
CASE "lime" (**Some code here**)
CASE "orange" (**Some code here**)
CASE "apple" (**Some code here**)
CASE ELSE
(**Some code here**)
END SELECT