case in group by in a store procedure
Posted
by Luca Romagnoli
on Stack Overflow
See other posts from Stack Overflow
or by Luca Romagnoli
Published on 2010-03-15T11:33:21Z
Indexed on
2010/03/15
11:39 UTC
Read the original article
Hit count: 230
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
© Stack Overflow or respective owner