How do I perform a GROUP BY on an aliased column in MS-SQL Server? -


I am trying to process group on an alliance column (given below) , But can not determine the proper syntax

  select last name + ',' first name 'full name' by customers 'full name'  

What is the correct syntax?


Edit

The question is going forward (I do not think the answers I received were not expected) solution still Will apply to a CASEED aliased column?

  Select Last name when Null is not the last name, Last Name + ',' + Firstname as 'Full Name' Customer Group LastName, FirstName < Pass the group you want instead of Allaase  
  SELECT LastName + ',' Firstname as 'Full Name' by Clients from Group LastName + ',' + FirstName  

Comments