T SQL Count question

Posted by johniom on Stack Overflow See other posts from Stack Overflow or by johniom
Published on 2010-03-18T00:42:08Z Indexed on 2010/03/18 0:51 UTC
Read the original article Hit count: 421

Filed under:
|

I'm making a report at work which looks at 5 columns which all contain v1aa, v1ab and v1ac.

What I want to do is count up all the v1aa in the 5 columns and show the results (and the same for v1ab and v1ac)

An example of how I like it to be displayed as is as follows :-

Amber = 3 (v1aa code)
Blue =  2 (v1ab code)
Red  = 1 (v1ac code)

Could anyone give me any tips how to get me started?

© Stack Overflow or respective owner

Related posts about sql-server-2005

Related posts about tsql