PL/SQL (MOSC)

MOSC Banner

using a case statement

edited Jan 28, 2010 4:31AM in PL/SQL (MOSC) 6 commentsAnswered ✓
 

When using case statments i have the following:

  CASE
               WHEN (  SELECT SUBSTR (global_name, 1, 8) FROM global_name) LIKE
                       '%2%'
               THEN
                  'PNC'
               WHEN campus LIKE '%FW'
               THEN
                  'PNC'
               WHEN CAMPUS LIKE 'T%'
               THEN
                  'PNC'
               WHEN CAMPUS = 'CEC'
               THEN
                  'PNC'
               WHEN CAMPUS = 'LCF'
               THEN
                  'PNC'
               WHEN CAMPUS = 'WCF'
               THEN
                  'PNC'
               ELSE
                  CAMPUS
            END

How can I reduce the amount of when statements so I can use a wild card so no matter what the value is I will set it to PNC.

thanks

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center