It's not easy to know what to say when leaving somewhere after being employed there for the best part of a decade.
If leaving voluntarily, you are likely to have been offered more money elsewhere, but it's not easy to say that in a subtle manner which would not sever any ties. Perhaps you could also briefly describe the things that you have liked and disliked about your job. You should probably also welcome everybody for a few leaving drinks.
It might even be possible to place into your leaving note the precise trigger that made you depart, and maybe even refer to the actual time and place where you made your decision.
And all this should ideally be said within about three short paragraphs, my self-imposed "haiku" note ideal. Oh, I've past my limit now, will have to give an example tomorrow…