Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Case Statement Question
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00977856
Message ID:
00977857
Views:
35
This message has been marked as the solution to the initial question of the thread.
Kirk,

It's basically an ELSE....in the CASE entry in BOL, the following example should help...
SELECT   Category = 
      CASE type
         WHEN 'popular_comp' THEN 'Popular Computing'
         WHEN 'mod_cook' THEN 'Modern Cooking'
         WHEN 'business' THEN 'Business'
         WHEN 'psychology' THEN 'Psychology'
         WHEN 'trad_cook' THEN 'Traditional Cooking'
         ELSE 'Not yet categorized'
      END,
   CAST(title AS varchar(25)) AS 'Shortened Title',
Kevin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform