I have got this table:
[tt]
DateEntered code
----------- --------
1/1/2004 abc
1/1/2004 def
1/5/2004 def
2/2/2004 abc
2/9/2004 xyz
4/1/2004 abc
4/1/2004 xyz
[/tt]
and I want to turn it into:
[tt]
code 1/2004 2/2004 3/2004 4/2004
----- ------- ------ ------ -------
abc 1 1 0 1
def 2 0 0 0
xyz 0 1 0 1
[/tt]
I have spent many hours trying to figure it out but with my limited knowledge in sql I just have no luck at all. Is it even possible to create the table with the month as header?
Thanks in advance.
[tt]
DateEntered code
----------- --------
1/1/2004 abc
1/1/2004 def
1/5/2004 def
2/2/2004 abc
2/9/2004 xyz
4/1/2004 abc
4/1/2004 xyz
[/tt]
and I want to turn it into:
[tt]
code 1/2004 2/2004 3/2004 4/2004
----- ------- ------ ------ -------
abc 1 1 0 1
def 2 0 0 0
xyz 0 1 0 1
[/tt]
I have spent many hours trying to figure it out but with my limited knowledge in sql I just have no luck at all. Is it even possible to create the table with the month as header?
Thanks in advance.