View Single Post
  #2 (permalink)  
Old 03-04-02, 16:29
achorozy achorozy is offline
Registered User
 
Join Date: Dec 2001
Location: Toronto, Canada
Posts: 335
I'm assuming that customer_type may or may not contain the character 'B'.

For SQL Server

Code:
SELECT CASE customer_type
                 WHEN 'B' THEN 'Business'
                  ELSE 'Non Business'
            END
FROM CUSTOMER_TABLE 

OR

SELECT CASE WHEN customer_type = 'B' THEN 'Business'
                  ELSE 'Non Business'
            END
FROM CUSTOMER_TABLE
Reply With Quote