Actually my code i gave you doesnt even work and yours is off too.
This is a example of what I need done.. Say I have a house with 54 rooms (BATCH), and in each room there is a number of kids (SPEND_DATE), now I say each kid speaks a different language. I want to make each kid speak the same language as the kids in THEIR OWN ROOM (BATCH).
For example room 1(batch) has 50 kids. 10 Kids speak chinese, and 40 speak american.
So I make all 50 speak american.