I hated all the things I had toiled for under the sun, because I must leave them to the one who comes after me.
And who knows whether he will be a wise man or a fool? Yet he will have control over all the work into which I have poured my effort and skill under the sun. This too is meaningless.
So my heart began to despair over all my toilsome labor under the sun.
For a man may do his work with wisdom, knowledge and skill, and then he must leave all he owns to someone who has not worked for it. This too is meaningless and a great misfortune.
What does a man get for all the toil and anxious striving with which he labors under the sun?
Ecclesiastes Chapter 2: Verses 18 - 22