case in group by in a store procedure
- by Luca Romagnoli
is possible do a case in a group by?
similar to this:
select * from table
GROUP BY
CASE WHEN @Attivita=0 THEN (RANK() OVER (GROUP BY Nome,AccountID,Matricola DESC))
END
thanks