J
Jerry Baker
I have a table like this:
NAME CODE FREQUENCY
-------------------------
Bob 1 3
Frank 3 2
Bob 3 4
Joe 2 1
Joe 1 2
I need a query to return results like this:
NAME CODE 1 CODE 2 CODE 3
------------------------------
Bob 3 0 4
Frank 0 0 2
Joe 2 1 0
I cannot change the database as it is pre-existing and must remain in
its current configuration. I have tried a lot of variations of GROUP BY
and SELECT AS, but I can't seem to make it work right.
Thanks for any help you can give.
NAME CODE FREQUENCY
-------------------------
Bob 1 3
Frank 3 2
Bob 3 4
Joe 2 1
Joe 1 2
I need a query to return results like this:
NAME CODE 1 CODE 2 CODE 3
------------------------------
Bob 3 0 4
Frank 0 0 2
Joe 2 1 0
I cannot change the database as it is pre-existing and must remain in
its current configuration. I have tried a lot of variations of GROUP BY
and SELECT AS, but I can't seem to make it work right.
Thanks for any help you can give.