Click to See Complete Forum and Search --> : Carry over the previous amount if amount=0


sweet_babylhyn
November 12th, 2006, 09:11 PM
I'm using MySQL and i have to make query that carry the total amount for week 1 if the the total amount of week 2 is equal to zero.

Ex.

Week 1 Week 2 Week 3 Week 4 Week 5
1900.89 0 0 4500 0


Output after the query

Week1 Week 2 Week 3 Week 4 Week 5
1900.89 1900.89 1900.89 4500 4500


Pls. help!!!

I will very appreciate your reply.

Thanx!!1

cjard
November 14th, 2006, 12:25 PM
i have to make query that carry the total amount for week 1 if the the total amount of week 2 is equal to zero
Your question does not state what happens to Week 3, but your example data shows that something has happened to week 3. To avoid wasting people's time, please more accurately specify your question