Open topic with navigation

TIBCO ActiveSpaces® 4.8.0

# CASE Expressions used in the Select List

You can use CASE expressions in the select list of SELECT statements.

For more details on CASE Expressions, see CASE Expressions.

Using a CASE expression in the select list of a SELECT statement can either help categorize results based on their values or help apply different calculations to a result based on its value. For example, the following query can be used to find out the number of employees that are in 'in-state' versus 'out-of-state':

    SELECT empid, CASE state WHEN ‘IL’ THEN ‘in-state’ ELSE ‘out-of-state’ END AS location FROM employee

Subtopics

Copyright © 2009-2022. Cloud Software Group, Inc. All Rights Reserved.