doormat, I have only had time to skim read posts here and I might be repeating things or getting them wrong but thought I'd list the things that help turn my 9 year old son's behaviour around, it it's of any help to you.
He started Year 4 under a big cloud - we were called in to discuss his behaviour with his teacher and the SENCO. We were told he was fidgity, distracting and sometimes defiant to teachers, but they also said he was not special needs, since (their reason) he knew how to behave, he just chose not to. Is this like your son?
Now a year later and although no great personality change, he is (so far, don't want to push my luck) better both at home and at school.
What helped:
A behaviour book and home/school agreement - my son, my dh and I along with his class teacher all agreed what was expected from my ds and what he could expect from us. We also agreed with him on rewards for having a good week. And punishments for having a bad week ( no gameboy or xbox). It was much easier to back up school discliple because I had a written record of what had happened in class. It was not just my son's version. He is honest on the whole, but would sometimes tell me stories about how he had been punished and others hadn't. Armed with the behaviour book, I could write down his version of events and ask the teacher for her comments - there was a two-way flow of information, with no need of calling a formal meeting with her. Each day his teacher and dh or I wrote comments (good or bad) in his behaviour book so we all knew what was going on. At the end of a good week at home and school he got a reward (money or a fishing trip with dh). Nothing happened much for a term and a half. I only noticed the difference in the spring of this year. Suddenly there were longer 'good' periods. I then upped the reward so just three good days got him a little extra money, just to spur him on. That worked really well. His teacher backed this too.She started giving him double bonus points if he got no minus points over three days - he was rewarded just for not being naughty He didn't have to be particularly good. The school recognised his efforts in simply staying out of trouble. Overall, rewards worked better than punishment by then.
Actively encouraging him to stay away from boys who encouraged him to behave badly - his teacher used to give him a minus mark just for talking to two certain boys in class time. It wasn't that they were bad, but just that they wound up my son. I also gave my son packed lunches because these boys had school dinners. My son told me that if he sat with them they would make him get into trouble. He was getting fed up of being told off. He also had a friend a few doors down from us who egged him on. Again my son recognised this and so we gradually put more distance between them both. At the same time he saw more of his other friends who were 'good'.
Also in the early summer he had a grommit fitted so he could hear better and started taking fish oils - I have no idea if either of these physical changes worked wonders - my son has stopped the fish oils now and I can't see any regression, but you never know.
I am sure you have tried everything and I know how hopeless things can seem - you say your son is usually good at home so it must be extremely frustrating for you.
Hope I am not teaching you to suck eggs but here are other things that work for me:
Warning first then taking away myu son's gameboy or pokemon cards if he does not stop. Also I tell him he must do 'x' before I have finished counting to 10. If not he gets 'x, y z' taken away. It's in black and white them with a time limit. He responds to this.
If you do decide to change schools, this may be a turning point. Although it has taken my son over a year to settle into his new school (he changed schools at 7 years), I am totally convinced, and my son seems to think this too, that if he had stayed at his other school his behaviour would be far more uncontrollable.