This should be a lot easier than the way I'm doing it.
my begining tables look like
------------------------
Table A
Arowid ItemID Year aValue useit
1 1 1999 30 true
2 1 2000 20 true
3 1 2001 10 true
4 2 1999 40 true
5 2 2000 40 true
6 3 2001 12 false
7 4 1999 10 false
Table B
BrowID Year W1 W2
1 1999 .1 .2
2 2000 .2 .4
3 2001 .3 .6
----------------------------------------------------
What the customer wants to see:
ItemID 1999 2000 2001 sum(W1*aValue) sum(W2*aValue)
1 30 20 10 10 20
2 40 40 12 24
---------------------------------------------------
writing the queries to get the values was easy enough but displaying in the above format isn't working
my begining tables look like
------------------------
Table A
Arowid ItemID Year aValue useit
1 1 1999 30 true
2 1 2000 20 true
3 1 2001 10 true
4 2 1999 40 true
5 2 2000 40 true
6 3 2001 12 false
7 4 1999 10 false
Table B
BrowID Year W1 W2
1 1999 .1 .2
2 2000 .2 .4
3 2001 .3 .6
----------------------------------------------------
What the customer wants to see:
ItemID 1999 2000 2001 sum(W1*aValue) sum(W2*aValue)
1 30 20 10 10 20
2 40 40 12 24
---------------------------------------------------
writing the queries to get the values was easy enough but displaying in the above format isn't working