how to stop whining in school age children

Adjust the way you view whining. Parents need to understand that children are not using whining to deliberately drive them crazy. They are doing it to express their frustration or because they want to be heard. When children express their needs and want, it’s actually a normal part of the development and it’s a good thing.
Consider what may be triggering this behavior. Does your child whine when he’s had a particularly busy day? Or when he’s hungry or tired or hasn’t had enough time with you? Or have there been changes in his life on a larger scale, such as a new sibling or a problem at home or at school? Then consider some adjustments to his routines that may help curb whining and other negative behaviors. Try spending some time with your child just hanging out and reading, riding bikes, or cooking together.

Call out the whining. Your child may not even realize that she is whining (this is especially true for younger children). Call her attention to her behavior by demonstrating what she sounds like. You can use humor here and say something like, “What would it be like if grownups went around whining about things they sometimes didn’t want to do, such as getting up for work when they are tired or cleaning the house?” Then show your child what whining sounds like. But take care not to make fun of her—the point is to show her what she sounds like, not to mock her feelings.
Make it clear that whining is not acceptable. Your child has to know that whining is not to be used to express himself. Just as you taught your child when he was a toddler that it was not acceptable to hit when he didn’t get his way, you can make it clear to your child now that whining is unpleasant and will never get him what he wants. Tell him clearly and calmly that you will not listen to what he has to say until he is able to say what he wants in a normal tone of voice.

Don’t let 'em see you sweat. Apply a little Zen discipline here and stay calm when your child begins whining. Remember when your child was little and she fell, and then would watch for your reaction to decide how upset she should be? The same principle applies here. If your child sees you being affected by her whining—and even worse, giving in to what she wants when she whines—then she will take her cues from your reaction.
Do not give in. Would it be easier to just hand your child that pack of candy or coveted toy to stop the whining? Yes. But it would be a definite mistake and would be a sure-fire way to encourage your child to use whining again the next time he wants something.
Be consistent. Not being consistent is one of those common discipline mistakes parents make. Do not enforce the “no whining” rule in one instance and then give in on another. When you are inconsistent, you are diluting the message that whining is not to be used and is something you will not tolerate.