• You're getting an error because the CASE statement needs to be enclosed in parentheses.

    Roland Alexander 
    The Monday Morning DBA 
    There are two means of refuge from the miseries of life: music and cats. ~ Albert Schweitzer