In a message dated 00-03-08 10:09:15 EST, you write:
How do I create a CASE Object so that the name rather than the statement is
in the GROUP BY clause?
It depends on whether you database allows that or not. In most cases, the Group By must reflect exactly the same as the select clause. For example:
select first_name + last_name full_name, count(*) from customer
group by first_name + last_name
The group by must include the exact expression so that it knows how to “group” the data. It can’t simply refer to “full_name” as that has no meaning to the database. I suspect that you are in the same situation.
You should get the correct answer. Is there any reason you are looking for the case name instead of the expression?